[Rt-commit] rt branch, 4.4/previewscrips-checkbox, created. rt-4.4.1-218-gceea94d

Shawn Moore shawn at bestpractical.com
Thu Jan 5 15:13:18 EST 2017


The branch, 4.4/previewscrips-checkbox has been created
        at  ceea94d731308e9fc96e4fcf4db7ad28407f7152 (commit)

- Log -----------------------------------------------------------------
commit ceea94d731308e9fc96e4fcf4db7ad28407f7152
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Thu Jan 5 20:05:52 2017 +0000

    Clicking "All recipients" should toggle its checkbox
    
    Checkboxes without a <label> have a much smaller click target.
    
    Introduced in 8ff7ab4d950d36e50a873f8000df3783f7215474, the <label> tags
    were referring to the checkboxes by their "name" attribute accidentally,
    when they should be referring to the checkbox by its "id".
    
    Using id to associate the label and the checkbox is slightly confounded
    by there being potentially two checkboxes with the id
    "TxnSendMailToAll", one for the original PreviewScrips panel and one for
    the Simplified Recipients panel. So we disambiguate those two checkboxes
    by giving them unique ids.
    
    Another approach would be to move the checkbox element into the label
    tag, but the existing CSS to line up the checkboxes doesn't handle such
    markup.
    
    Fixes: I#32514

diff --git a/share/html/Helpers/PreviewScrips b/share/html/Helpers/PreviewScrips
index 8314b2b..ecc2a3e 100644
--- a/share/html/Helpers/PreviewScrips
+++ b/share/html/Helpers/PreviewScrips
@@ -93,7 +93,7 @@ $submitted{$_} = 1 for split /,/, $ARGS{TxnRecipients};
 %          my $action = $s->ActionObj->Action;
 %          scalar(map { $action->$_ } qw(To Cc Bcc))
 %        } @scrips ) {
-<input type="checkbox" class="checkbox" name="TxnSendMailToAll" value="1">
+<input type="checkbox" class="checkbox" id="TxnSendMailToAll" name="TxnSendMailToAll" value="1">
 <label for="TxnSendMailToAll"><b><% loc('All recipients') %></b></label><br />
 %   }
 %     for my $scrip (@scrips) {
diff --git a/share/html/Helpers/ShowSimplifiedRecipients b/share/html/Helpers/ShowSimplifiedRecipients
index 4d2801f..f72cd71 100644
--- a/share/html/Helpers/ShowSimplifiedRecipients
+++ b/share/html/Helpers/ShowSimplifiedRecipients
@@ -103,8 +103,8 @@ $submitted{$_} = 1 for split /,/, $ARGS{TxnRecipients};
 <tr>
 <td> </td>
 <td>
-<input type="checkbox" class="checkbox" name="TxnSendMailToAll" value="1">
-<label for="TxnSendMailToAll"><b><% loc('All recipients') %></b></label>
+<input type="checkbox" class="checkbox" id="TxnSendMailToAll-Simplified" name="TxnSendMailToAll" value="1">
+<label for="TxnSendMailToAll-Simplified"><b><% loc('All recipients') %></b></label>
 </td>
 </tr>
 % }

-----------------------------------------------------------------------


More information about the rt-commit mailing list