aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-09-01 06:55:08 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-09-01 06:55:08 +0900
commit170bba3f35048cdbb95713fd1d45dd43b301d005 (patch)
tree59ae73b034603fd51ffdf3371126e921acb51156 /Mailman
parent066507c7aba29d9459e82137ae95ee42e6fe5e4e (diff)
parent7c3207ca991ee5723ff7c656d00f263d82b3f480 (diff)
downloadmailman2-170bba3f35048cdbb95713fd1d45dd43b301d005.tar.gz
mailman2-170bba3f35048cdbb95713fd1d45dd43b301d005.tar.xz
mailman2-170bba3f35048cdbb95713fd1d45dd43b301d005.zip
merge lp:mailman/2.1 up to rev 1722
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Cgi/admindb.py25
-rw-r--r--Mailman/HTMLFormatter.py1
-rwxr-xr-xMailman/htmlformat.py12
3 files changed, 14 insertions, 24 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py
index 855c2e04..cc863306 100644
--- a/Mailman/Cgi/admindb.py
+++ b/Mailman/Cgi/admindb.py
@@ -95,8 +95,9 @@ def hacky_radio_buttons(btnname, labels, values, defaults, spacing=3):
space = '&nbsp;' * spacing
btns = Table(cellspacing='5', cellpadding='0')
btns.AddRow([space + text + space for text in labels])
- btns.AddRow([Center(RadioButton(btnname, value, default))
- for value, default in zip(values, defaults)])
+ btns.AddRow([Center(RadioButton(btnname, value, default).Format()
+ + '<div class=hidden>' + label + '</div>')
+ for label, value, default in zip(labels, values, defaults)])
return btns
@@ -747,20 +748,14 @@ def show_post_requests(mlist, id, info, total, count, form):
when = msgdata.get('received_time')
if when:
t.AddRow([Bold(_('Received:')), time.ctime(when)])
- t.AddCellInfo(row+2, col-1, align='right')
- # 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='&nbsp;'*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.AddCellInfo(row+3, col-1, align='right')
+ buttons = hacky_radio_buttons(id,
+ (_('Defer'), _('Approve'), _('Reject'), _('Discard')),
+ (mm_cfg.DEFER, mm_cfg.APPROVE, mm_cfg.REJECT, mm_cfg.DISCARD),
+ (1, 0, 0, 0),
+ spacing=5)
t.AddRow([Bold(_('Action:')), buttons])
- t.AddCellInfo(row+3, col-1, align='right')
+ t.AddCellInfo(t.GetCurrentRowIndex(), col-1, align='right')
t.AddRow(['&nbsp;',
'<label>' +
CheckBox('preserve-%d' % id, 'on', 0).Format() +
diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py
index 2a3e08db..a6e1b88f 100644
--- a/Mailman/HTMLFormatter.py
+++ b/Mailman/HTMLFormatter.py
@@ -87,6 +87,7 @@ class HTMLFormatter:
for person in people:
id = Utils.ObscureEmail(person)
url = self.GetOptionsURL(person, obscure=obscure)
+ person = self.getMemberCPAddress(person)
if obscure:
showing = Utils.ObscureEmail(person, for_text=1)
else:
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py
index 19f6457d..210150ed 100755
--- a/Mailman/htmlformat.py
+++ b/Mailman/htmlformat.py
@@ -318,15 +318,9 @@ class Document(Container):
'content="text/html; charset=%s">' % charset)
if self.title:
output.append('%s<TITLE>%s</TITLE>' % (tab, self.title))
- # This is a kluge to only add this style to the page that needs it.
- parts = Utils.GetPathPieces()
- if parts:
- if len(parts) > 2 and parts[-1] not in ('add', 'remove',
- 'change'):
- parts[2] = 'list'
- if (len(parts) == 2 and parts[1] == 'members' or
- len(parts) > 2 and parts[1:3] == ['members', 'list']):
- output.append("""\
+ # Add CSS to visually hide some labeling text but allow screen
+ # readers to read it.
+ output.append("""\
<style type="text/css">
div.hidden
{position:absolute;