aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Cgi/admin.py23
-rwxr-xr-xMailman/htmlformat.py21
2 files changed, 36 insertions, 8 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py
index 63f77101..eeefc056 100644
--- a/Mailman/Cgi/admin.py
+++ b/Mailman/Cgi/admin.py
@@ -1055,7 +1055,8 @@ def membership_options(mlist, subcat, cgidata, doc, form):
fullname = Utils.uncanonstr(mlist.getMemberName(addr),
mlist.preferred_language)
name = TextBox(qaddr + '_realname', fullname, size=longest).Format()
- cells = [Center(CheckBox(qaddr + '_unsub', 'off', 0).Format()),
+ cells = [Center(CheckBox(qaddr + '_unsub', 'off', 0).Format()
+ + '<div class="hidden">' + _('unsub') + '</div>'),
link.Format() + '<br>' +
name +
Hidden('user', qaddr).Format(),
@@ -1068,9 +1069,12 @@ def membership_options(mlist, subcat, cgidata, doc, form):
value = 'off'
checked = 0
box = CheckBox('%s_mod' % qaddr, value, checked)
- cells.append(Center(box).Format())
+ cells.append(Center(box.Format()
+ + '<div class="hidden">' + _('mod') + '</div>'))
+ # Kluge, get these translated.
+ (_('hide'), _('nomail'), _('ack'), _('notmetoo'), _('nodupes'))
for opt in ('hide', 'nomail', 'ack', 'notmetoo', 'nodupes'):
- extra = ''
+ extra = '<div class="hidden">' + _(opt) + '</div>'
if opt == 'nomail':
status = mlist.getDeliveryStatus(addr)
if status == MemberAdaptor.ENABLED:
@@ -1079,7 +1083,7 @@ def membership_options(mlist, subcat, cgidata, doc, form):
else:
value = 'on'
checked = 1
- extra = '[%s]' % ds_abbrevs[status]
+ extra = '[%s]' % ds_abbrevs[status] + extra
elif mlist.getMemberOption(addr, mm_cfg.OPTINFO[opt]):
value = 'on'
checked = 1
@@ -1092,17 +1096,22 @@ def membership_options(mlist, subcat, cgidata, doc, form):
# the underlying dictionary attribute. This version is slower and
# less memory efficient. It points to a new MemberAdaptor interface
# method.
+ extra = '<div class="hidden">' + _('digest') + '</div>'
if addr in mlist.getRegularMemberKeys():
- cells.append(Center(CheckBox(qaddr + '_digest', 'off', 0).Format()))
+ cells.append(Center(CheckBox(qaddr + '_digest', 'off', 0).Format()
+ + extra))
else:
- cells.append(Center(CheckBox(qaddr + '_digest', 'on', 1).Format()))
+ cells.append(Center(CheckBox(qaddr + '_digest', 'on', 1).Format()
+ + extra))
if mlist.getMemberOption(addr, mm_cfg.OPTINFO['plain']):
value = 'on'
checked = 1
else:
value = 'off'
checked = 0
- cells.append(Center(CheckBox('%s_plain' % qaddr, value, checked)))
+ cells.append(Center(CheckBox(
+ '%s_plain' % qaddr, value, checked).Format()
+ + '<div class="hidden">' + _('plain') + '</div>'))
# User's preferred language
langpref = mlist.getMemberLanguage(addr)
langs = mlist.GetAvailableLanguages()
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py
index f144c069..19f6457d 100755
--- a/Mailman/htmlformat.py
+++ b/Mailman/htmlformat.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -318,6 +318,25 @@ 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("""\
+<style type="text/css">
+ div.hidden
+ {position:absolute;
+ left:-10000px;
+ top:auto;
+ width:1px;
+ height:1px;
+ overflow:hidden;}
+</style>
+""")
if mm_cfg.WEB_HEAD_ADD:
output.append(mm_cfg.WEB_HEAD_ADD)
output.append('%s</HEAD>' % tab)