diff options
author | msapiro <> | 2005-11-09 03:08:35 +0000 |
---|---|---|
committer | msapiro <> | 2005-11-09 03:08:35 +0000 |
commit | 540fa47a356a66faada25162a13d72ded738eeef (patch) | |
tree | 76debc0efa1ba3cfbc171da59ce32d9cad77dcff | |
parent | 4ac1ed4da3711de16734304955f883e33105a069 (diff) | |
download | mailman2-540fa47a356a66faada25162a13d72ded738eeef.tar.gz mailman2-540fa47a356a66faada25162a13d72ded738eeef.tar.xz mailman2-540fa47a356a66faada25162a13d72ded738eeef.zip |
Make sure the moderate selection is initialized from
DEFAULT_DEFAULT_MEMBER_MODERATION
and preserved across errors.
-rw-r--r-- | Mailman/Cgi/create.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py index 540d9d6c..661035c0 100644 --- a/Mailman/Cgi/create.py +++ b/Mailman/Cgi/create.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2004 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2005 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -84,7 +84,8 @@ def process_request(doc, cgidata): except ValueError: notify = 0 try: - moderate = int(cgidata.getvalue('moderate', '0')) + moderate = int(cgidata.getvalue('moderate', + mm_cfg.DEFAULT_DEFAULT_MEMBER_MODERATION)) except ValueError: moderate = mm_cfg.DEFAULT_DEFAULT_MEMBER_MODERATION @@ -358,6 +359,11 @@ def request_creation(doc, cgidata=dummy, errmsg=None): notify = int(cgidata.getvalue('notify', '1')) except ValueError: notify = 1 + try: + moderate = int(cgidata.getvalue('moderate', + mm_cfg.DEFAULT_DEFAULT_MEMBER_MODERATION)) + except ValueError: + moderate = mm_cfg.DEFAULT_DEFAULT_MEMBER_MODERATION ftable.AddRow([Center(Italic(_('List Characteristics')))]) ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, colspan=2) @@ -367,7 +373,7 @@ def request_creation(doc, cgidata=dummy, errmsg=None): are allowed to post unmoderated to this list? Answer <em>Yes</em> to hold new member postings for moderator approval by default.""")), RadioButtonArray('moderate', (_('No'), _('Yes')), - checked=mm_cfg.DEFAULT_DEFAULT_MEMBER_MODERATION, + checked=moderate, values=(0,1))]) ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, bgcolor=GREY) ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 1, bgcolor=GREY) |