Putting 4.2.0 on top of 4.0.17
[usit-rt.git] / share / html / Approvals / Elements / PendingMyApproval
index 475cb42..a4ec8ae 100644 (file)
 % }
 
 <&| /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 />
 
-<&|/l_unsafe, 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 />
+<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 />
 
-<&|/l_unsafe, qq{<input size='15' class="ui-datepicker" value='}.( $created_after->Unix >0 && $created_after->ISO(Timezone => 'user'))."' name='CreatedAfter' id='CreatedAfter' />"&>Only show approvals for requests created after [_1]</&>
+<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_unsafe, qq{<input size='15' class="datepicker" value='}.($created_before->Unix > 0 &&$created_before->ISO(Timezone => 'user'))."' name='CreatedBefore' id='CreatedBefore' />"&>Only show approvals for requests created before [_1]</&><br />
+
+<&|/l_unsafe, qq{<input size='15' class="datepicker" value='}.( $created_after->Unix >0 && $created_after->ISO(Timezone => 'user'))."' name='CreatedAfter' id='CreatedAfter' />"&>Only show approvals for requests created after [_1]</&>
 </&>
 
 <%init>
@@ -80,27 +87,27 @@ my $created_before = RT::Date->new( $session{'CurrentUser'} );
 my $created_after = RT::Date->new( $session{'CurrentUser'} );
 
 foreach ($tickets, $group_tickets) {
-    $_->Limit( FIELD      => 'Type', VALUE => 'approval' );
+    $_->LimitType( VALUE => 'approval' );
 
     if ( $ARGS{'ShowResolved'} ) {
-       $_->LimitStatus( VALUE => 'resolved' );
+        $_->LimitStatus( VALUE => 'resolved' );
     }
     if ( $ARGS{'ShowRejected'} ) {
-       $_->LimitStatus( VALUE => 'rejected' );
+        $_->LimitStatus( VALUE => 'rejected' );
     }
     if ( $ARGS{'ShowPending'} || ( !$ARGS{'ShowRejected'} && !$ARGS{'Resolved'} ) ) {
-       $_->LimitStatus( VALUE => 'open' );
-       $_->LimitStatus( VALUE => 'new' );
-       $_->LimitStatus( VALUE => 'stalled' );
+        $_->LimitStatus( VALUE => 'open' );
+        $_->LimitStatus( VALUE => 'new' );
+        $_->LimitStatus( VALUE => 'stalled' );
     }
 
     if ( $ARGS{'CreatedBefore'} ) {
-       $created_before->Set( Format => 'unknown', Value => $ARGS{'CreatedBefore'} );
-       $_->LimitCreated( OPERATOR => "<=", VALUE => $created_before->ISO );
+        $created_before->Set( Format => 'unknown', Value => $ARGS{'CreatedBefore'} );
+        $_->LimitCreated( OPERATOR => "<=", VALUE => $created_before->ISO );
     }
     if ( $ARGS{'CreatedAfter'} ) {
-       $created_after->Set( Format => 'unknown', Value => $ARGS{'CreatedAfter'} );
-       $_->LimitCreated( OPERATOR => ">=", VALUE => $created_after->ISO );
+        $created_after->Set( Format => 'unknown', Value => $ARGS{'CreatedAfter'} );
+        $_->LimitCreated( OPERATOR => ">=", VALUE => $created_after->ISO );
     }
     $_->OrderBy( FIELD => 'id' );
 }