[Rt-commit] r11677 - in rt/branches/3.8-TESTING/html: Admin/Elements Elements Search/Elements Ticket

ruz at bestpractical.com ruz at bestpractical.com
Thu Apr 10 16:52:55 EDT 2008


Author: ruz
Date: Thu Apr 10 16:52:55 2008
New Revision: 11677

Modified:
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldLookupType
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldType
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectScrip
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripAction
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripCondition
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectSingleOrMultiple
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectStage
   rt/branches/3.8-TESTING/html/Admin/Elements/SelectTemplate
   rt/branches/3.8-TESTING/html/Elements/EditCustomFieldSelect
   rt/branches/3.8-TESTING/html/Elements/SelectLang
   rt/branches/3.8-TESTING/html/Elements/SelectMatch
   rt/branches/3.8-TESTING/html/Elements/SelectOwner
   rt/branches/3.8-TESTING/html/Elements/SelectSortOrder
   rt/branches/3.8-TESTING/html/Elements/SelectStatus
   rt/branches/3.8-TESTING/html/Elements/SelectTicketSortBy
   rt/branches/3.8-TESTING/html/Elements/SelectTicketTypes
   rt/branches/3.8-TESTING/html/Elements/SelectWatcherType
   rt/branches/3.8-TESTING/html/Search/Elements/SelectChartType
   rt/branches/3.8-TESTING/html/Search/Elements/SelectGroup
   rt/branches/3.8-TESTING/html/Search/Elements/SelectPersonType
   rt/branches/3.8-TESTING/html/Ticket/Elements/ShowDates
   rt/branches/3.8-TESTING/html/Ticket/Update.html

Log:
* apply xhtml cleanups from Jason Long

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldLookupType
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldLookupType	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldLookupType	Thu Apr 10 16:52:55 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 %for my $option ($cf->LookupTypes) {
-<option value="<%$option%>" <%defined ($Default) && ($option eq $Default) && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></option>
+<option value="<%$option%>"<%defined ($Default) && ($option eq $Default) && qq[ selected="selected"] |n%>><% $cf->FriendlyLookupType($option) %></option>
 %}
 </select>
 <%INIT>

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldType
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldType	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectCustomFieldType	Thu Apr 10 16:52:55 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 %for my $option ($cf->TypeComposites) {
-<option value="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></option>
+<option value="<%$option%>"<%$option eq $Default && qq[ selected="selected"] |n%>><% $cf->FriendlyTypeComposite($option) %></option>
 %}
 </select>
 <%INIT>

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectScrip
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectScrip	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectScrip	Thu Apr 10 16:52:55 2008
@@ -47,11 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% $Default eq undef && 'SELECTED' %>
+<% $Default eq undef && qq[ selected="selected"] |n %>
 >-</option>
 %while  (my $Scrip = $Scrips->Next) {
 <option value="<% $Scrip->Id %>"
-<% $Scrip->Id == $Default && 'SELECTED' %>
+<% $Scrip->Id == $Default && qq[ selected="selected"] |n %>
 ><% loc($Scrip->Name) %>
 </option>
 %}

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripAction
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripAction	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripAction	Thu Apr 10 16:52:55 2008
@@ -47,11 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% ! defined $Default && 'SELECTED' %>
+<% ! defined $Default && qq[ selected="selected"] |n %>
 >-</option>
 %while  (my $ScripAction = $ScripActions->Next) {
 <option value="<%$ScripAction->Id%>"
-<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
+<% defined $Default && $ScripAction->Id == $Default && qq[ selected="selected"] |n %>
 ><% loc($ScripAction->Name) %>
 </option>
 %}

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripCondition
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripCondition	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectScripCondition	Thu Apr 10 16:52:55 2008
@@ -47,11 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% ! defined $Default && 'SELECTED' %>
+<% ! defined $Default && qq[ selected="selected"] %>
 >-</option>
 %while  (my $ScripCondition = $ScripConditions->Next) {
 <option value="<%$ScripCondition->Id%>"
-<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
+<% defined $Default && $ScripCondition->Id == $Default && qq[ selected="selected"] %>
 ><% loc($ScripCondition->Name) %>
 </option>
 %}

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectSingleOrMultiple
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectSingleOrMultiple	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectSingleOrMultiple	Thu Apr 10 16:52:55 2008
@@ -46,18 +46,18 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
   <select name="<%$Name%>">
-    <option value="1" <%$SingleDefault%>><&|/l&>Single</&></option>
-    <option value="0" <%$MultipleDefault%>><&|/l&>Multiple</&></option>
+    <option value="1"<%$SingleDefault|n%>><&|/l&>Single</&></option>
+    <option value="0"<%$MultipleDefault|n%>><&|/l&>Multiple</&></option>
   </select>	
 
 
 <%INIT>
 my ($SingleDefault, $MultipleDefault);
 if ($Default == 1) {
-    $SingleDefault = "SELECTED";
+    $SingleDefault = qq[ selected="selected"];
 }
 elsif ($Default == 0 ) {
-    $MultipleDefault = "SELECTED";
+    $MultipleDefault = qq[ selected="selected"];
 }
 
 </%INIT>

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectStage
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectStage	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectStage	Thu Apr 10 16:52:55 2008
@@ -48,7 +48,7 @@
 <select name="<%$Name%>">
 % foreach my $stage (@stages) {
 <option value="<%$stage%>"
-<% ($stage eq $Default) && 'SELECTED' %>
+<% ($stage eq $Default) && qq[ selected="selected"] |n %>
 ><% loc($stage) %>
 </option>
 % }

Modified: rt/branches/3.8-TESTING/html/Admin/Elements/SelectTemplate
==============================================================================
--- rt/branches/3.8-TESTING/html/Admin/Elements/SelectTemplate	(original)
+++ rt/branches/3.8-TESTING/html/Admin/Elements/SelectTemplate	Thu Apr 10 16:52:55 2008
@@ -47,17 +47,17 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 <option value="" 
-<% defined($Default) && $Default eq 'none' && 'SELECTED' %>
+<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>
 >-</option>
 %while  (my $Template = $PrimaryTemplates->Next) {
 <option value="<%$Template->Id%>"
-<% ($Template->Id == $Default) && 'SELECTED' %>
+<% ($Template->Id == $Default) && qq[ selected="selected"] |n %>
 ><% loc($Template->Name) %>
 </option>
 %}
 %while  (my $Template = $OtherTemplates->Next) {
 <option value="<%$Template->Id%>"
-<% defined($Default) && ($Template->Id == $Default)  && 'SELECTED'%>
+<% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>
 ><&|/l, loc($Template->Name) &>Global template: [_1]</&>
 </option>
 %}

Modified: rt/branches/3.8-TESTING/html/Elements/EditCustomFieldSelect
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/EditCustomFieldSelect	(original)
+++ rt/branches/3.8-TESTING/html/Elements/EditCustomFieldSelect	Thu Apr 10 16:52:55 2008
@@ -56,7 +56,7 @@
 <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/cascaded.js"></script>
 %#      XXX - Hide this select from w3m?
       <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<% $id %>-Category">
-        <option value="" <% !$selected && 'selected' %>><&|/l&>-</&></option>
+        <option value=""<% !$selected && qq[ selected="selected"] |n %>><&|/l&>-</&></option>
 %           foreach my $cat (@category) {
 %               my ($depth, $name) = @$cat;
         <option value="<% $name %>"><% '&nbsp;' x $depth |n %><% $name %></option>
@@ -67,8 +67,8 @@
 %       if ( $Rows && ( $Multiple || !@category ) ) {
         size="<% $Rows %>"
 %       }
-        <% $Multiple && 'multiple' %> >
-        <option value="" <% !$selected && 'SELECTED' %>><&|/l&>(no value)</&></option>
+        <% $Multiple && qq[multiple="multiple"] |n %> >
+        <option value=""<% !$selected && qq[ selected="selected"] |n %>><&|/l&>(no value)</&></option>
 %       $m->out($out);
       </select>
 <%ARGS>

Modified: rt/branches/3.8-TESTING/html/Elements/SelectLang
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectLang	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectLang	Thu Apr 10 16:52:55 2008
@@ -50,7 +50,7 @@
 <option value="">-</option>
 % }
 % foreach my $lang (@lang) {
-<option value="<%$lang%>" <%(defined($Default) && ($lang eq $Default)) && 'SELECTED'%>><% $lang_to_desc{$lang} %>
+<option value="<%$lang%>"<%(defined($Default) && ($lang eq $Default)) && qq[ selected="selected"] |n%>><% $lang_to_desc{$lang} %>
 %   if (($Verbose) and (my $description = I18N::LangTags::List::native_name($lang)) ){
 (<%$description%>)
 %   }

Modified: rt/branches/3.8-TESTING/html/Elements/SelectMatch
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectMatch	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectMatch	Thu Apr 10 16:52:55 2008
@@ -68,15 +68,15 @@
 my $NotLikeDefault ='';
 
 if ($Default && $Default =~ /false/i) {
-	$FalseDefault = "SELECTED";
+	$FalseDefault = qq[ selected="selected"];
 }
 elsif ($Default && $Default =~ /true/i) {
-	$TrueDefault = "SELECTED";
+	$TrueDefault = qq[ selected="selected"];
 } 
 elsif ($Default && $Default =~ /notlike/i) {
-	$NotLikeDefault = "SELECTED";
+	$NotLikeDefault = qq[ selected="selected"];
 }
 else {
-	$LikeDefault = "SELECTED";
+	$LikeDefault = qq[ selected="selected"];
 }
 </%INIT>

Modified: rt/branches/3.8-TESTING/html/Elements/SelectOwner
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectOwner	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectOwner	Thu Apr 10 16:52:55 2008
@@ -47,11 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>" id="<%$Name%>">
 %if ($DefaultValue) {
-<option <% !$Default ? "SELECTED" : '' %> value=""><%$DefaultLabel%></option>
+<option value=""<% !$Default ? qq[ selected="selected"] : '' |n %>><%$DefaultLabel%></option>
 %}
 % $Default = 0 unless defined $Default && $Default =~ /^\d+$/;
 %foreach my $User ( @users)  {
-<option <% ( $User->Id == $Default) ? "SELECTED" : ''%>
+<option <% ( $User->Id == $Default) ? qq[ selected="selected"] : '' |n %>
 %if ($ValueAttribute eq 'id') {
     value="<%$User->id%>"
 %} elsif ($ValueAttribute eq 'Name') {

Modified: rt/branches/3.8-TESTING/html/Elements/SelectSortOrder
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectSortOrder	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectSortOrder	Thu Apr 10 16:52:55 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 %foreach my $order (@orders) {
-<option value="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
+<option value="<%$order%>"<%$order eq $Default && qq[ selected="selected"] |n %>>
 <% shift @order_names %>
 </option>
 % }

Modified: rt/branches/3.8-TESTING/html/Elements/SelectStatus
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectStatus	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectStatus	Thu Apr 10 16:52:55 2008
@@ -47,11 +47,11 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 %if ($DefaultValue) {
-<option <% !$Default && "SELECTED" %> value=""><%$DefaultLabel%></option>
+<option value=""<% !$Default && qq[ selected="selected"] |n %>><%$DefaultLabel%></option>
 %}
 %foreach my $status (@status) {
 %next if ($SkipDeleted && $status eq 'deleted');
-<option <% (defined $Default &&  $status eq $Default) && "SELECTED" %> value="<%$status%>"><%loc($status)%></option>
+<option value="<%$status%>"<% (defined $Default && $status eq $Default) && qq[ selected="selected"] |n %>><%loc($status)%></option>
 % }
 </select>
 <%ONCE>

Modified: rt/branches/3.8-TESTING/html/Elements/SelectTicketSortBy
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectTicketSortBy	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectTicketSortBy	Thu Apr 10 16:52:55 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 % foreach my $field (@sortfields) {
-<option value="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></option>
+<option value="<%$field%>"<% $field eq $Default && qq[ selected="selected"] |n%>><% loc($field) %></option>
 % }
 </select>
 

Modified: rt/branches/3.8-TESTING/html/Elements/SelectTicketTypes
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectTicketTypes	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectTicketTypes	Thu Apr 10 16:52:55 2008
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <select name="<%$Name%>">
 %foreach (@Types) {
-<option value="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&>
+<option value="<% $_ %>"<% ($_ eq $Default) && qq[ selected="selected"] |n %>><&|/l&><% $_ %></&>
 %}
 </select>
 

Modified: rt/branches/3.8-TESTING/html/Elements/SelectWatcherType
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectWatcherType	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectWatcherType	Thu Apr 10 16:52:55 2008
@@ -50,7 +50,7 @@
 <option value="">-</option>
 % }
 %for my $option (@types) {
-<option value="<%$option%>" <%defined($Default) && $option eq $Default && "SELECTED"%>><%loc($option)%></option>
+<option value="<%$option%>"<%defined($Default) && $option eq $Default && qq[ selected="selected"] |n %>><%loc($option)%></option>
 %}
 </select>
 

Modified: rt/branches/3.8-TESTING/html/Search/Elements/SelectChartType
==============================================================================
--- rt/branches/3.8-TESTING/html/Search/Elements/SelectChartType	(original)
+++ rt/branches/3.8-TESTING/html/Search/Elements/SelectChartType	Thu Apr 10 16:52:55 2008
@@ -51,6 +51,6 @@
 </%args>
 <select name="<%$Name%>">
 % foreach my $option qw(bar pie) {
-<option value="<%$option%>" <% $option eq $Default ? 'SELECTED' : '' %>><%loc($option)%></option>
+<option value="<%$option%>"<% $option eq $Default ? qq[ selected="selected"] : '' |n %>><%loc($option)%></option>
 % }
 </select>

Modified: rt/branches/3.8-TESTING/html/Search/Elements/SelectGroup
==============================================================================
--- rt/branches/3.8-TESTING/html/Search/Elements/SelectGroup	(original)
+++ rt/branches/3.8-TESTING/html/Search/Elements/SelectGroup	Thu Apr 10 16:52:55 2008
@@ -50,7 +50,7 @@
 <option value="">-</option>
 % }
 %while (my $group = $groups->Next) {
-<option value="<%$group->id%>" <%$group->id eq $Default && "SELECTED"%>><%$group->Name%></option>
+<option value="<%$group->id%>"<%$group->id eq $Default && qq[ selected="selected"] |n %>><%$group->Name%></option>
 %}
 </select>
 

Modified: rt/branches/3.8-TESTING/html/Search/Elements/SelectPersonType
==============================================================================
--- rt/branches/3.8-TESTING/html/Search/Elements/SelectPersonType	(original)
+++ rt/branches/3.8-TESTING/html/Search/Elements/SelectPersonType	Thu Apr 10 16:52:55 2008
@@ -51,11 +51,11 @@
 % }
 % for my $option (@types) {
 %  if ($Suffix) {
-<option value="<% $option %><% $Suffix %>" <%$option eq $Default && "SELECTED"%> ><%loc($option)%></option>
+<option value="<% $option %><% $Suffix %>"<%$option eq $Default && qq[ selected="selected"] |n %> ><%loc($option)%></option>
 %   next;
 %  }
 %  foreach my $subtype (@subtypes) {
-<option value="<%"$option.$subtype"%>" <%$option eq $Default && $subtype eq 'EmailAddress' && "SELECTED"%> ><% loc($option) %> <% loc($subtype) %></option>
+<option value="<%"$option.$subtype"%>"<%$option eq $Default && $subtype eq 'EmailAddress' && qq[ selected="selected"] |n %> ><% loc($option) %> <% loc($subtype) %></option>
 %  }
 % }
 </select>

Modified: rt/branches/3.8-TESTING/html/Ticket/Elements/ShowDates
==============================================================================
--- rt/branches/3.8-TESTING/html/Ticket/Elements/ShowDates	(original)
+++ rt/branches/3.8-TESTING/html/Ticket/Elements/ShowDates	Thu Apr 10 16:52:55 2008
@@ -79,7 +79,7 @@
     <td class="label date updated"><&|/l&>Updated</&>:</td>
 % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never");
 % if ($UpdatedLink) {
-    <td class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></td>
+    <td class="value date updated"><a href="#lasttrans"><% $UpdatedString | h %></a></td>
 % } else {
     <td class="value date updated"><% $UpdatedString | h %></td>
 % }

Modified: rt/branches/3.8-TESTING/html/Ticket/Update.html
==============================================================================
--- rt/branches/3.8-TESTING/html/Ticket/Update.html	(original)
+++ rt/branches/3.8-TESTING/html/Ticket/Update.html	Thu Apr 10 16:52:55 2008
@@ -86,10 +86,10 @@
 <tr><td align="right"><&|/l&>Update Type</&>:</td>
 <td><select name="UpdateType">
 % if ($CanComment) {
-<option value="private" <% ($ARGS{'UpdateType'} &&  $ARGS{'UpdateType'} eq "private") ? "SELECTED" : !$ARGS{'UpdateType'}&&$CommentDefault%>><&|/l&>Comments (Not sent to requestors)</&></option>
+<option value="private"<% ($ARGS{'UpdateType'} &&  $ARGS{'UpdateType'} eq "private") ? qq[ selected="selected"] : !$ARGS{'UpdateType'}&&$CommentDefault |n %>><&|/l&>Comments (Not sent to requestors)</&></option>
 % }
 % if ($CanRespond) {
-<option value="response" <% ($ARGS{'UpdateType'} && $ARGS{'UpdateType'} eq "response") ? "SELECTED" : !$ARGS{'UpdateType'}&&$ResponseDefault%>><&|/l&>Reply to requestors</&></option>
+<option value="response"<% ($ARGS{'UpdateType'} && $ARGS{'UpdateType'} eq "response") ? qq[ selected="selected"] : !$ARGS{'UpdateType'}&&$ResponseDefault |n %>><&|/l&>Reply to requestors</&></option>
 % }
 </select> 
 </td></tr>
@@ -185,11 +185,11 @@
 
 my ($CommentDefault, $ResponseDefault);
 if ($Action ne 'Respond') {
-   $CommentDefault = "SELECTED"; 
+    $CommentDefault = qq[ selected="selected"]; 
     $ResponseDefault = "";
 } else {
     $CommentDefault = ""; 
-    $ResponseDefault = "SELECTED";
+    $ResponseDefault = qq[ selected="selected"];
 }
 
 


More information about the Rt-commit mailing list