------------------------------------------------------------
revno: 1347
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.2
timestamp: Mon 2014-06-09 15:07:53 -0700
message:
  <label> tags have been added around most check boxes and radio buttons
  and their text labels in the admin and admindb web GUI so they can be
  (de)selected by clicking the text.  (LP: #266391)
modified:
  Mailman/Cgi/admindb.py
  Mailman/htmlformat.py
  NEWS


--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Cgi/admindb.py'
--- Mailman/Cgi/admindb.py	2014-03-22 03:46:01 +0000
+++ Mailman/Cgi/admindb.py	2014-06-09 22:07:53 +0000
@@ -236,9 +236,11 @@
         nomessages = not mlist.GetHeldMessageIds()
         if not (details or sender or msgid or nomessages):
             form.AddItem(Center(
+                '<label>' +
                 CheckBox('discardalldefersp', 0).Format() +
                 '&nbsp;' +
-                _('Discard all messages marked <em>Defer</em>')
+                _('Discard all messages marked <em>Defer</em>') +
+                '</label>'
                 ))
         # Add a link back to the overview, if we're not viewing the overview!
         adminurl = mlist.GetScriptURL('admin', absolute=1)
@@ -284,9 +286,11 @@
             form.AddItem('<hr>')
             if not (details or sender or msgid or nomessages):
                 form.AddItem(Center(
+                    '<label>' +
                     CheckBox('discardalldefersp', 0).Format() +
                     '&nbsp;' +
-                    _('Discard all messages marked <em>Defer</em>')
+                    _('Discard all messages marked <em>Defer</em>') +
+                    '</label>'
                     ))
             form.AddItem(Center(SubmitButton('submit', _('Submit All Data'))))
         # Put 'Logout' link before the footer
@@ -357,8 +361,10 @@
                                          mm_cfg.DISCARD),
                                  checked=0).Format()
         if addr not in mlist.ban_list:
-            radio += '<br>' + CheckBox('ban-%d' % id, 1).Format() + \
-                     '&nbsp;' + _('Permanently ban from this list')
+            radio += ('<br>' + '<label>' +
+                     CheckBox('ban-%d' % id, 1).Format() +
+                     '&nbsp;' + _('Permanently ban from this list') +
+                     '</label>')
         # While the address may be a unicode, it must be ascii
         paddr = addr.encode('us-ascii', 'replace')
         table.AddRow(['%s<br><em>%s</em>' % (paddr, Utils.websafe(fullname)),
@@ -466,15 +472,19 @@
         left.AddRow([btns])
         left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
         left.AddRow([
+            '<label>' +
             CheckBox('senderpreserve-' + qsender, 1).Format() +
             '&nbsp;' +
-            _('Preserve messages for the site administrator')
+            _('Preserve messages for the site administrator') +
+            '</label>'
             ])
         left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
         left.AddRow([
+            '<label>' +
             CheckBox('senderforward-' + qsender, 1).Format() +
             '&nbsp;' +
-            _('Forward messages (individually) to:')
+            _('Forward messages (individually) to:') +
+            '</label>'
             ])
         left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
         left.AddRow([
@@ -490,9 +500,11 @@
         if mlist.isMember(sender):
             if mlist.getMemberOption(sender, mm_cfg.Moderate):
                 left.AddRow([
+                    '<label>' +
                     CheckBox('senderclearmodp-' + qsender, 1).Format() +
                     '&nbsp;' +
-                    _("Clear this member's <em>moderate</em> flag")
+                    _("Clear this member's <em>moderate</em> flag") +
+                    '</label>'
                     ])
             else:
                 left.AddRow(
@@ -503,9 +515,11 @@
                             mlist.reject_these_nonmembers +
                             mlist.discard_these_nonmembers):
             left.AddRow([
+                '<label>' +
                 CheckBox('senderfilterp-' + qsender, 1).Format() +
                 '&nbsp;' +
-                _('Add <b>%(esender)s</b> to one of these sender filters:')
+                _('Add <b>%(esender)s</b> to one of these sender filters:') +
+                '</label>'
                 ])
             left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
             btns = hacky_radio_buttons(
@@ -517,10 +531,11 @@
             left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
             if sender not in mlist.ban_list:
                 left.AddRow([
+                    '<label>' +
                     CheckBox('senderbanp-' + qsender, 1).Format() +
                     '&nbsp;' +
                     _("""Ban <b>%(esender)s</b> from ever subscribing to this
-                    mailing list""")])
+                    mailing list""") + '</label>'])
                 left.AddCellInfo(left.GetCurrentRowIndex(), 0, colspan=2)
         right = Table(border=0)
         right.AddRow([
@@ -710,12 +725,16 @@
     t.AddRow([Bold(_('Action:')), buttons])
     t.AddCellInfo(row+3, col-1, align='right')
     t.AddRow(['&nbsp;',
+              '<label>' +
               CheckBox('preserve-%d' % id, 'on', 0).Format() +
-              '&nbsp;' + _('Preserve message for site administrator')
+              '&nbsp;' + _('Preserve message for site administrator') +
+              '</label>'
               ])
     t.AddRow(['&nbsp;',
+              '<label>' +
               CheckBox('forward-%d' % id, 'on', 0).Format() +
               '&nbsp;' + _('Additionally, forward this message to: ') +
+              '</label>' +
               TextBox('forward-addr-%d' % id, size=47,
                       value=mlist.GetOwnerEmail()).Format()
               ])

=== modified file 'Mailman/htmlformat.py'
--- Mailman/htmlformat.py	2012-06-20 23:35:09 +0000
+++ Mailman/htmlformat.py	2014-06-09 22:07:53 +0000
@@ -540,7 +540,9 @@
                                   self.button_names,
                                   self.values):
             ischecked = (self.ischecked(i))
-            item = self.Widget(self.name, value, ischecked).Format() + name
+            item = ('<label>' +
+                    self.Widget(self.name, value, ischecked).Format() +
+                    name + '</label>')
             items.append(item)
             if not self.horizontal:
                 t.AddRow(items)

=== modified file 'NEWS'
--- NEWS	2014-06-06 20:29:48 +0000
+++ NEWS	2014-06-09 22:07:53 +0000
@@ -62,6 +62,10 @@
 
   Bug fixes and other patches
 
+    - <label> tags have been added around most check boxes and radio buttons
+      and their text labels in the admin and admindb web GUI so they can be
+      (de)selected by clicking the text.  (LP: #266391)
+
     - If checking DNS for dmarc_moderation_action and DNS lookup is not
       available, log it.  (LP: #1324541)
  

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to