[Rt-commit] rt branch, 4.0/label-fields, updated. rt-4.0.0rc7-153-g2a98370

Shawn Moore sartak at bestpractical.com
Thu Mar 24 15:36:58 EDT 2011


The branch, 4.0/label-fields has been updated
       via  2a98370b28c2f64d39db776289a0afae948c9196 (commit)
       via  b6e6ebef270937ba06f0d9a21b958336d42cf333 (commit)
      from  a399cd8d0d566864bf38e826c426c7081a7066cc (commit)

Summary of changes:
 share/html/Admin/Articles/Classes/Objects.html     |    8 ++++----
 share/html/Admin/Articles/Classes/index.html       |    3 ++-
 share/html/Admin/CustomFields/Modify.html          |    4 ++--
 share/html/Admin/CustomFields/Objects.html         |    8 ++++----
 share/html/Admin/CustomFields/index.html           |    4 ++--
 share/html/Admin/Elements/EditCustomField          |    3 ++-
 share/html/Admin/Elements/ModifyTemplate           |    9 +++++++--
 share/html/Approvals/Elements/PendingMyApproval    |   17 ++++++++++++-----
 share/html/Articles/Article/Elements/EditLinks     |    4 ++--
 .../Articles/Article/Elements/ShowSearchCriteria   |    4 ++--
 share/html/Elements/EditCustomFieldCombobox        |    3 ++-
 share/html/Prefs/Quicksearch.html                  |    6 ++++--
 share/html/Search/Bulk.html                        |    4 ++--
 share/html/m/ticket/create                         |    3 ++-
 14 files changed, 49 insertions(+), 31 deletions(-)

- Log -----------------------------------------------------------------
commit b6e6ebef270937ba06f0d9a21b958336d42cf333
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Mar 24 15:02:10 2011 -0400

    Various labeling improvements

diff --git a/share/html/Admin/Articles/Classes/Objects.html b/share/html/Admin/Articles/Classes/Objects.html
index d7ee473..20117fc 100644
--- a/share/html/Admin/Articles/Classes/Objects.html
+++ b/share/html/Admin/Articles/Classes/Objects.html
@@ -54,13 +54,13 @@
 
 % if ( $is_global ) {
 <h2><&|/l&>Applies to all objects</&></h2>
-<input type="checkbox" name="RemoveClass-<% $Class->id %>" value="0" />
-<&|/l&>check this box to remove this Class globally and be able to choose specific Queues.</&>
+<input type="checkbox" id="RemoveClass-<% $Class->id %>" name="RemoveClass-<% $Class->id %>" value="0" />
+<label for="RemoveClass-<% $Class->id %>"><&|/l&>check this box to remove this Class globally and be able to choose specific Queues.</&></label>
 % } else {
 <h2><&|/l&>Apply globally</&></h2>
 
-<input type="checkbox" name="AddClass-<% $Class->id %>" value="0" />
-<&|/l&>check this box to apply this Class globally to all Queues.</&>
+<input type="checkbox" id="AddClass-<% $Class->id %>" name="AddClass-<% $Class->id %>" value="0" />
+<label for="AddClass-<% $Class->id %>"><&|/l&>check this box to apply this Class globally to all Queues.</&></label>
 
 <h2><&|/l&>Selected Queues</&></h2>
 <& /Elements/CollectionList,
diff --git a/share/html/Admin/Articles/Classes/index.html b/share/html/Admin/Articles/Classes/index.html
index 75257fd..502304e 100644
--- a/share/html/Admin/Articles/Classes/index.html
+++ b/share/html/Admin/Articles/Classes/index.html
@@ -65,7 +65,8 @@
 % }
 
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Articles/Classes/index.html">
-<input type="checkbox" name="FindDisabledClasses" value="1" /><&|/l&>Include disabled classes in listing.</&><br />
+<input type="checkbox" id="FindDisabledClasses" name="FindDisabledClasses" value="1" />
+<label for="FindDisabledClasses"><&|/l&>Include disabled classes in listing.</&></label><br />
 <div align="right"><input type="submit" value="<&|/l&>Go!</&>" /></div> 
 </form>
 <%INIT>
diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 44a2f67..88f9782 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -132,8 +132,8 @@
 
 <tr><td class="label">&nbsp;</td><td>
 <input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" name="Enabled" value="1" <% $EnabledChecked |n%> />
-<&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <% $EnabledChecked |n %> />
+<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this custom field)</&></label>
 </td></tr>
 
 % $m->callback(CallbackName => 'EndOfTable', CustomField => $CustomFieldObj, CFvalidations => \@CFvalidations);
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index e1cc2ba..cd572d3 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -55,13 +55,13 @@
 
 % if ( $is_global ) {
 <h2><&|/l&>Applies to all objects</&></h2>
-<input type="checkbox" name="RemoveCustomField-<% $CF->id %>" value="0" />
-<&|/l&>check this box to remove this Custom Field from all objects and be able to choose specific objects.</&>
+<input type="checkbox" id="RemoveCustomField-<% $CF->id %>" name="RemoveCustomField-<% $CF->id %>" value="0" />
+<label for="RemoveCustomField-<% $CF->id %>"><&|/l&>check this box to remove this Custom Field from all objects and be able to choose specific objects.</&></label>
 % } else {
 <h2><&|/l&>Apply globally</&></h2>
 
-<input type="checkbox" name="AddCustomField-<% $CF->id %>" value="0" />
-<&|/l&>check this box to apply this Custom Field to all objects.</&>
+<input type="checkbox" id="AddCustomField-<% $CF->id %>" name="AddCustomField-<% $CF->id %>" value="0" />
+<label for="AddCustomField-<% $CF->id %>"><&|/l&>check this box to apply this Custom Field to all objects.</&></label>
 
 % unless ( $CF->ApplyGlobally ) {
 <h2><&|/l&>Selected objects</&></h2>
diff --git a/share/html/Admin/CustomFields/index.html b/share/html/Admin/CustomFields/index.html
index fa913f2..b48fd44 100644
--- a/share/html/Admin/CustomFields/index.html
+++ b/share/html/Admin/CustomFields/index.html
@@ -77,8 +77,8 @@
 % }
 </select>
 <br />
-<input type="checkbox" class="checkbox" name="ShowDisabled" value="1" <% $ShowDisabled && 'checked="checked"' |n%> />
-<&|/l&>Include disabled custom fields in listing.</&>
+<input type="checkbox" class="checkbox" id="ShowDisabled" name="ShowDisabled" value="1" <% $ShowDisabled && 'checked="checked"' |n %> />
+<label for="ShowDisabled"><&|/l&>Include disabled custom fields in listing.</&></label>
 <br />
 
 % $m->callback(CallbackName => 'BeforeSubmit');
diff --git a/share/html/Admin/Elements/EditCustomField b/share/html/Admin/Elements/EditCustomField
index 920698d..4b6ef3a 100755
--- a/share/html/Admin/Elements/EditCustomField
+++ b/share/html/Admin/Elements/EditCustomField
@@ -71,7 +71,8 @@
 <tr><td>
 </td><td>
 <input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
+<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this custom field)</&></label>
 </td></tr>
 </table>
 
diff --git a/share/html/Admin/Elements/ModifyTemplate b/share/html/Admin/Elements/ModifyTemplate
index 79b639f..3e22aab 100755
--- a/share/html/Admin/Elements/ModifyTemplate
+++ b/share/html/Admin/Elements/ModifyTemplate
@@ -57,8 +57,13 @@
 <tr>
 <td class="label"><&|/l&>Type</&>:</td>
 <td class="value">
-<input type="radio" name="Type" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>><&|/l&>Perl</&></input><br />
-<input type="radio" name="Type" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>><&|/l&>Simple</&></input><br />
+
+<input type="radio" name="Type" id="Type-Perl" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>></input>
+<label for="Type-Perl"><&|/l&>Perl</&></label><br />
+
+<input type="radio" name="Type" id="Type-Simple" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>>
+<label for="Type-Simple"><&|/l&>Simple</&></label><br />
+
 </td>
 </tr>
 <tr>
diff --git a/share/html/Approvals/Elements/PendingMyApproval b/share/html/Approvals/Elements/PendingMyApproval
index 788f0e8..f4e923f 100755
--- a/share/html/Approvals/Elements/PendingMyApproval
+++ b/share/html/Approvals/Elements/PendingMyApproval
@@ -55,13 +55,20 @@
 % }
 
 <&| /Widgets/TitleBox, title => loc("Search for approvals") &>
-<input type="checkbox" class="checkbox" value="1" name="ShowPending"
+<input type="checkbox" class="checkbox" value="1" id="ShowPending" name="ShowPending"
         <%((!$ARGS{'ShowRejected'} && !$ARGS{'ShowResolved'}) ||
          $ARGS{'ShowPending'})
-        && qq[checked="checked"] |n%> /> <&|/l&>Show pending requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowResolved" <% defined($ARGS{'ShowResolved'}) && $ARGS{'ShowResolved'} && qq[checked="checked"] |n%> /> <&|/l&>Show approved requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowRejected" <% defined($ARGS{'ShowRejected'}) && $ARGS{'ShowRejected'} && qq[checked="checked"] |n%> /> <&|/l&>Show denied requests</&><br />
-<input type="checkbox" class="checkbox" value="1" name="ShowDependent" <% defined($ARGS{'ShowDependent'}) && $ARGS{'ShowDependent'} && qq[checked="checked"] |n%> /> <&|/l&>Show requests awaiting other approvals</&><br />
+        && qq[checked="checked"] |n%> />
+<label for="ShowPending"><&|/l&>Show pending requests</&></label><br />
+
+<input type="checkbox" class="checkbox" value="1" id="ShowResolved" name="ShowResolved" <% defined($ARGS{'ShowResolved'}) && $ARGS{'ShowResolved'} && qq[checked="checked"] |n%> />
+<label for="ShowResolved"><&|/l&>Show approved requests</&></label><br />
+
+<input type="checkbox" class="checkbox" value="1" id="ShowRejected" name="ShowRejected" <% defined($ARGS{'ShowRejected'}) && $ARGS{'ShowRejected'} && qq[checked="checked"] |n%> />
+<label for="ShowRejected"><&|/l&>Show denied requests</&></label><br />
+
+<input type="checkbox" class="checkbox" value="1" id="ShowDependent" name="ShowDependent" <% defined($ARGS{'ShowDependent'}) && $ARGS{'ShowDependent'} && qq[checked="checked"] |n%> />
+<label for="ShowDependent"><&|/l&>Show requests awaiting other approvals</&></label><br />
 
 <&|/l, qq{<input size='15' class="ui-datepicker" value='}.($created_before->Unix > 0 &&$created_before->ISO(Timezone => 'user'))."' name='CreatedBefore' id='CreatedBefore' />"&>Only show approvals for requests created before [_1]</&><br />
 
diff --git a/share/html/Articles/Article/Elements/EditLinks b/share/html/Articles/Article/Elements/EditLinks
index 768ca02..626b2da 100644
--- a/share/html/Articles/Article/Elements/EditLinks
+++ b/share/html/Articles/Article/Elements/EditLinks
@@ -63,7 +63,7 @@
 %   while (my $link = $refersto->Next) {
 %     my $member = $link->TargetURI;
 <li>
-<input type="CHECKBOX" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" />
+<input type="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" />
 %     if ($link->TargetURI->IsLocal) {
 <a href="<%$member->Resolver->HREF%>"><% loc($member->Object->ObjectTypeStr) %> <%$member->Object->Id%></a>: 
 %       if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
@@ -90,7 +90,7 @@
 %   while (my $link = $referredtoby->Next) {
 %     my $member = $link->BaseURI;
 <li>
-<input type="CHECKBOX" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" />
+<input type="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" />
 %     if ($link->BaseURI->IsLocal) {
 <a href="<%$member->Resolver->HREF%>"><% loc($member->Object->ObjectTypeStr) %> <%$member->Object->Id%>: 
 %       if (UNIVERSAL::isa($member->Object, "RT::Article") or UNIVERSAL::can($member->Object, 'Name')) {
diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index 57a6df3..1c459e1 100644
--- a/share/html/Articles/Article/Elements/ShowSearchCriteria
+++ b/share/html/Articles/Article/Elements/ShowSearchCriteria
@@ -136,8 +136,8 @@
 <td>
 <& /Articles/Article/Elements/EditTopics, %ARGS, Classes => \@Classes, OnlyThisClass => 1 &>
 <br />
-<input type="checkbox" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
-<&|/l&>Include subtopics</&> 
+<input type="checkbox" id="ExpandTopics" name="ExpandTopics" <% $ARGS{'ExpandTopics'} ? 'checked="checked"' : "" %> />
+<label for="ExpandTopics"><&|/l&>Include subtopics</&></label>
 </td>
 </tr>
 </table>
diff --git a/share/html/Elements/EditCustomFieldCombobox b/share/html/Elements/EditCustomFieldCombobox
index 970b11b..6398da2 100644
--- a/share/html/Elements/EditCustomFieldCombobox
+++ b/share/html/Elements/EditCustomFieldCombobox
@@ -46,7 +46,8 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 % while ($Values and my $value = $Values->Next and $Multiple) {
-<input type="checkbox" class="checkbox CF-<%$CustomField->id%>-Edit" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" class="CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" /><% $value->Content %>
+<input type="checkbox" id="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" class="checkbox CF-<%$CustomField->id%>-Edit" name="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds" class="CF-<%$CustomField->id%>-Edit" value="<% $value->Id %>" />
+<label for="<%$NamePrefix%><%$CustomField->Id%>-DeleteValueIds"><% $value->Content %></label>
 <br />
 % }
 % (!$Multiple or !$MaxValues or !$Values or $Values->Count < $MaxValues) or return;
diff --git a/share/html/Prefs/Quicksearch.html b/share/html/Prefs/Quicksearch.html
index 1b57aee..db02439 100644
--- a/share/html/Prefs/Quicksearch.html
+++ b/share/html/Prefs/Quicksearch.html
@@ -53,11 +53,13 @@
 <form method="post" action="Quicksearch.html" name="Preferences">
 <ul>
 % for my $queue (@queues) {
-<li><input type="checkbox" class="checkbox" name="Want-<%$queue->Name%>" value="1"
+<li><input type="checkbox" class="checkbox" id="Want-<%$queue->Name%>" name="Want-<%$queue->Name%>" value="1"
 % unless ($unwanted->{$queue->Name}) {
 checked="checked"
 % }
-/><%$queue->Name%>: <%$queue->Description%></li>
+/>
+<label for="Want-<%$queue->Name%>"><%$queue->Name%>: <%$queue->Description%></label>
+</li>
 % }
 </ul>
 <& /Elements/Submit, Caption => loc("Save Changes"), Label => loc('Save'), Name => 'Save'&>
diff --git a/share/html/m/ticket/create b/share/html/m/ticket/create
index 5ddb6b8..35c9fd7 100644
--- a/share/html/m/ticket/create
+++ b/share/html/m/ticket/create
@@ -345,7 +345,8 @@ $m->scomp("/Ticket/Elements/EditTransactionCustomFields", %ARGS, QueueObj => $Qu
 
 <%loc("Check box to delete")%><br />
 % foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
+<input type="checkbox" class="checkbox" id="DeleteAttach-<%$attach_name%>" name="DeleteAttach-<%$attach_name%>" value="1" />
+<label for="DeleteAttach-<%$attach_name%>"><%$attach_name%></label><br />
 % } # end of foreach
 
 

commit 2a98370b28c2f64d39db776289a0afae948c9196
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Mar 24 15:36:36 2011 -0400

    Give Force Owner Change on bulk update a label
    
        According to W3C you can wrap an input element in a label and it
        works. Because we have text around the input, it seems better this
        way.

diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index c99bf41..dec03b7 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -80,8 +80,8 @@
 <table>
 <tr><td class="label"> <&|/l&>Make Owner</&>: </td>
 <td class="value"> <& /Elements/SelectOwner, Name => "Owner", Default => $ARGS{Owner} || '' &>
-(<input type="checkbox" class="checkbox" name="ForceOwnerChange"
- <% $ARGS{ForceOwnerChange} ? 'checked="checked"' : '' %> /> <&|/l&>Force change</&>) </td></tr>
+<label>(<input type="checkbox" class="checkbox" name="ForceOwnerChange"
+<% $ARGS{ForceOwnerChange} ? 'checked="checked"' : '' %> /> <&|/l&>Force change</&>)</label></td></tr>
 <tr><td class="label"> <&|/l&>Add Requestor</&>: </td>
 <td class="value"> <input name="AddRequestor" size="20" value="<% $ARGS{AddRequestor} || '' %>" /> </td></tr>
 <tr><td class="label"> <&|/l&>Remove Requestor</&>: </td>

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


More information about the Rt-commit mailing list