summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2000-09-12 03:39:09 +0000
committerbwarsaw2000-09-12 03:39:09 +0000
commitdf2a297ac206085913759c29c1f3fbf44a15d9ec (patch)
treebb99a97f0b39c230bff5c83efec229f8ab88f49e
parent027cad992391055c5aaeffdbb2e66fdb49b237c4 (diff)
downloadmailman-df2a297ac206085913759c29c1f3fbf44a15d9ec.tar.gz
mailman-df2a297ac206085913759c29c1f3fbf44a15d9ec.tar.zst
mailman-df2a297ac206085913759c29c1f3fbf44a15d9ec.zip
PrintPostRequest(): Hack around a usability issue pointed out by
Jeremy Hylton. The `Action:' buttons in horizontal placement are confusing: does the button go with the word before it or after it? Hard to tell without scanning the whole line. Unfortunately, vertical placement takes up too much real-estate. This compromise puts the buttons underneath the words.
-rw-r--r--Mailman/Cgi/admindb.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py
index 2fef4be02..f582f3917 100644
--- a/Mailman/Cgi/admindb.py
+++ b/Mailman/Cgi/admindb.py
@@ -198,13 +198,18 @@ def PrintPostRequest(mlist, id, info, total, count, form):
t.AddCellInfo(row+1, col-1, align='right')
t.AddRow([Bold('Reason:'), reason])
t.AddCellInfo(row+2, col-1, align='right')
- t.AddRow([
- Bold('Action:'),
- RadioButtonArray(id, ('Defer', 'Approve', 'Reject', 'Discard'),
- values=(mm_cfg.DEFER, mm_cfg.APPROVE, mm_cfg.REJECT,
- mm_cfg.DISCARD),
- checked=0)
- ])
+ # We can't use a RadioButtonArray here because horizontal placement can be
+ # confusing to the user and vertical placement takes up too much
+ # real-estate. This is a hack!
+ buttons = Table(cellspacing="5", cellpadding="0")
+ buttons.AddRow(map(lambda x, s=' '*5: s+x+s,
+ ('Defer', 'Approve', 'Reject', 'Discard')))
+ buttons.AddRow([Center(RadioButton(id, mm_cfg.DEFER, 1)),
+ Center(RadioButton(id, mm_cfg.APPROVE, 0)),
+ Center(RadioButton(id, mm_cfg.REJECT, 0)),
+ Center(RadioButton(id, mm_cfg.DISCARD, 0)),
+ ])
+ t.AddRow([Bold('Action:'), buttons])
t.AddCellInfo(row+3, col-1, align='right')
t.AddRow([' ',
CheckBox('preserve-%d' % id, 'on', 0).Format() +