[Rt-commit] rt branch, 30131, created. rt-4.2.13-46-g434613b
Dave Goehrig
dave at bestpractical.com
Tue Aug 16 14:26:29 EDT 2016
The branch, 30131 has been created
at 434613b4a64a43edce7fd825720b063633f769c1 (commit)
- Log -----------------------------------------------------------------
commit 434613b4a64a43edce7fd825720b063633f769c1
Author: Dave Goehrig <dave at bestpractical.com>
Date: Tue Aug 16 14:26:10 2016 -0400
Adding a checkbox to enable/disable viewing disabled scrips to match Queue select view
Fixes I#30131
diff --git a/share/html/Admin/Scrips/index.html b/share/html/Admin/Scrips/index.html
index a9549f6..df99e3b 100644
--- a/share/html/Admin/Scrips/index.html
+++ b/share/html/Admin/Scrips/index.html
@@ -48,6 +48,14 @@
<& /Admin/Elements/Header, Title => loc('Select a Scrip') &>
<& /Elements/Tabs &>
+<h1><%$caption%></h1>
+
+<form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Scrips/index.html">
+<input type="checkbox" class="checkbox" id="FindDisabledScrips" name="FindDisabledScrips" value="1" <% $FindDisabledScrips ? 'checked="checked"': '' |n%> />
+<label for="FindDisabledScrips"><&|/l&>Include disabled scrips in listing.</&></label>
+<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div>
+</form>
+
<& /Elements/CollectionList,
OrderBy => 'Description',
Order => 'ASC',
@@ -56,17 +64,31 @@
Collection => $scrips,
Format => $Format,
AllowSorting => 1,
+ PassArguments => [qw(
+ FindDisabledScrips
+ )],
&>
-<%args>
-$Format => undef
-</%args>
+
+
<%INIT>
my $scrips = RT::Scrips->new( $session{'CurrentUser'} );
-$scrips->FindAllRows;
+$scrips->FindAllRows if $FindDisabledScrips;
$scrips->UnLimit;
+my ($caption);
+$caption = $FindDisabledScrips
+ ? loc("All Scrips")
+ : loc("Enabled Scrips");
+
$m->callback(CallbackName => 'Massage', Scrips => $scrips);
$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Scrips'} || 50;
</%INIT>
+
+<%ARGS>
+$FindDisabledScrips => 0
+$Format => undef
+</%ARGS>
+
+
-----------------------------------------------------------------------
More information about the rt-commit
mailing list