diff options
| author | bwarsaw | 2001-05-10 21:56:28 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-10 21:56:28 +0000 |
| commit | 49f4bdb57d94c2e5d2986bfebe4457601645a907 (patch) | |
| tree | 88a169517299a83c13f1aa5664c44e8cb87ba8c9 /Mailman/Cgi/create.py | |
| parent | 7e1b51dd4914737fc36182b61fa3560f3ce0d3a7 (diff) | |
| download | mailman-49f4bdb57d94c2e5d2986bfebe4457601645a907.tar.gz mailman-49f4bdb57d94c2e5d2986bfebe4457601645a907.tar.zst mailman-49f4bdb57d94c2e5d2986bfebe4457601645a907.zip | |
Diffstat (limited to 'Mailman/Cgi/create.py')
| -rw-r--r-- | Mailman/Cgi/create.py | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py index 3c7925196..be695173d 100644 --- a/Mailman/Cgi/create.py +++ b/Mailman/Cgi/create.py @@ -75,6 +75,10 @@ def process_request(doc, cgidata): autogen = int(cgidata.getvalue('autogen', '0')) except ValueError: autogen = 0 + try: + notify = int(cgidata.getvalue('notify', '0')) + except ValueError: + notify = 0 password = cgidata.getvalue('password', '').strip() confirm = cgidata.getvalue('confirm', '').strip() auth = cgidata.getvalue('auth', '').strip() @@ -172,21 +176,22 @@ def process_request(doc, cgidata): sys.modules[modname].create(mlist) # And send the notice to the list owner - text = Utils.maketext( - 'newlist.txt', - {'listname' : listname, - 'password' : password, - 'admin_url' : mlist.GetScriptURL('admin', absolute=1), - 'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1), - 'requestaddr' : "%s-request@%s" % (listname, mlist.host_name), - 'hostname' : mlist.host_name, - }, mlist.preferred_language) - msg = Message.UserNotification( - owner, - 'mailman-owner@' + mlist.host_name, - _('Your new mailing list: %(listname)s'), - text) - msg.send(mlist) + if notify: + text = Utils.maketext( + 'newlist.txt', + {'listname' : listname, + 'password' : password, + 'admin_url' : mlist.GetScriptURL('admin', absolute=1), + 'listinfo_url': mlist.GetScriptURL('listinfo', absolute=1), + 'requestaddr' : "%s-request@%s" % (listname, mlist.host_name), + 'hostname' : mlist.host_name, + }, mlist.preferred_language) + msg = Message.UserNotification( + owner, + 'mailman-owner@' + mlist.host_name, + _('Your new mailing list: %(listname)s'), + text) + msg.send(mlist) # Success! listinfo_url = mlist.GetScriptURL('listinfo', absolute=1) @@ -295,6 +300,17 @@ def request_creation(doc, cgidata=dummy, errmsg=None): ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, bgcolor="#cccccc") ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 1, bgcolor="#cccccc") + try: + notify = int(cgidata.getvalue('notify', '1')) + except ValueError: + notify = 1 + ftable.AddRow([Label(_('Send "list created" email to list owner?')), + RadioButtonArray('notify', ('No', 'Yes'), + checked=notify, + values=(0, 1))]) + ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, bgcolor="#cccccc") + ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 1, bgcolor="#cccccc") + ftable.AddRow(['<hr>']) ftable.AddCellInfo(ftable.GetCurrentRowIndex(), 0, colspan=2) ftable.AddRow([Label(_("List creator's (authentication) password:")), |
