summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklm1998-03-08 05:20:19 +0000
committerklm1998-03-08 05:20:19 +0000
commit088b640f4078aa83675d81ee37d15c40d5d3db7f (patch)
treeef4dd7fb3c017da827856baf214be25845f518b6
parent8a5071974ca80b0fc1432ecac3145e8f8ba5cb22 (diff)
downloadmailman-088b640f4078aa83675d81ee37d15c40d5d3db7f.tar.gz
mailman-088b640f4078aa83675d81ee37d15c40d5d3db7f.tar.zst
mailman-088b640f4078aa83675d81ee37d15c40d5d3db7f.zip
Print error message headers in red, like in admin script.
-rwxr-xr-xcgi/admindb16
1 files changed, 10 insertions, 6 deletions
diff --git a/cgi/admindb b/cgi/admindb
index 28508bc01..ee47dbb27 100755
--- a/cgi/admindb
+++ b/cgi/admindb
@@ -51,18 +51,23 @@ def SubscribeNone():
else:
list.HandleRequest(('add_member', 0), 0)
-def PrintHeader(str):
- doc.AddItem(htmlformat.Header(3, htmlformat.Italic(str)))
+def PrintHeader(str, error=0):
+ if error:
+ it = htmlformat.FontAttr(str, color="ff5060")
+ else:
+ it = str
+ doc.AddItem(htmlformat.Header(3, htmlformat.Italic(it)))
doc.AddItem('<hr>')
def HandleRequests(doc):
if not form.has_key('adminpw'):
- PrintHeader('You need to supply the admin password to answer requests.')
+ PrintHeader('You need to supply the admin password '
+ 'to answer requests.', error=1)
return
try:
list.ConfirmAdminPassword(form['adminpw'].value)
except:
- PrintHeader('Incorrect admin password.')
+ PrintHeader('Incorrect admin password.', error=1)
return
ignore_subscribes = 0
if form.has_key('subscribe_all'):
@@ -117,8 +122,7 @@ def PrintPostRequest(val, form):
t.AddRow([
htmlformat.FontSize("+1",
htmlformat.Bold('If you reject this post, '
- 'why you chose to reject it '
- '(optional):')),
+ 'explain (optional):')),
htmlformat.TextBox("comment-%d" % val[0], size=50)])
cur_row = t.GetCurrentRowIndex()