diff options
| author | bwarsaw | 2000-09-09 19:19:47 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-09-09 19:19:47 +0000 |
| commit | 725da8c7634fa4e6e816cc69aaed5409ffcf8259 (patch) | |
| tree | 2cff6c51638d48a5932bee1a7b833eae6b90c37a /Mailman/Cgi/admin.py | |
| parent | 7a8a0554b2a09886fbca63e3de1f1da8ae97ceea (diff) | |
| download | mailman-725da8c7634fa4e6e816cc69aaed5409ffcf8259.tar.gz mailman-725da8c7634fa4e6e816cc69aaed5409ffcf8259.tar.zst mailman-725da8c7634fa4e6e816cc69aaed5409ffcf8259.zip | |
AddErrorMessage(): Insert the big red "Warning:" here, but make the
rest of the error message in black, italics. More readable, and makes
the warning stand out better.
main(): Improve the digestable/nondigestable sanity checks to use the
better error message output format, and to perform the tests after the
options have been changed (otherwise the warnings might not be still
applicable). Also added a warning when a list has disabled digest
deliver and non-digest delivery!
Diffstat (limited to 'Mailman/Cgi/admin.py')
| -rw-r--r-- | Mailman/Cgi/admin.py | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index 2474d0f24..8a6aeca97 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -117,20 +117,26 @@ def main(): if cgidata.has_key('bounce_matching_headers'): pairs = mlist.parse_matching_header_opt() - if not mlist.digestable and len(mlist.GetDigestMembers()): - AddErrorMessage(doc, - 'Warning: you have digest members,' - ' but digests are turned off.' - ' Those people will not receive mail.') - if not mlist.nondigestable and len(mlist.GetMembers()): - AddErrorMessage(doc, - 'Warning: you have list members,' - ' but non-digestified mail is turned' - ' off. They will receive mail until' - ' you fix this problem.') if len(cgidata.keys()): ChangeOptions(mlist, category, cgidata, doc) mlist.CheckValues() + + # Sanity checks + if not mlist.digestable and not mlist.nondigestable: + AddErrorMessage(doc, '''You have turned off delivery of + both digest and non-digest messages. This is an incompatible + state of affairs. You must turn on either digest delivery or + non-digest delivery or your mailing list will basically be + unusable.''') + if not mlist.digestable and len(mlist.GetDigestMembers()): + AddErrorMessage(doc, '''You have digest members, + but digests are turned off. Those people will not receive + mail.''') + if not mlist.nondigestable and len(mlist.GetMembers()): + AddErrorMessage(doc, '''You have regular list members + but non-digestified mail is turned off. They will receive mail + until you fix this problem.''') + FormatConfiguration(doc, mlist, category, category_suffix, cgidata) print doc.Format(bgcolor="#ffffff") finally: @@ -917,8 +923,9 @@ def ChangeOptions(mlist, category, cgi_info, document): def AddErrorMessage(doc, errmsg, *args): - doc.AddItem(Header(3, Italic(FontAttr(errmsg % args, - color="#ff66cc")))) + doc.AddItem(Header(3, Bold(FontAttr( + 'Warning: ', color="#ff0000", size="+2")).Format() + + Italic(errmsg % args).Format())) |
