summaryrefslogtreecommitdiff
path: root/rt/share/html/Admin/Scrips/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Admin/Scrips/index.html')
-rw-r--r--rt/share/html/Admin/Scrips/index.html32
1 files changed, 27 insertions, 5 deletions
diff --git a/rt/share/html/Admin/Scrips/index.html b/rt/share/html/Admin/Scrips/index.html
index a9549f6..e1fd1fe 100644
--- a/rt/share/html/Admin/Scrips/index.html
+++ b/rt/share/html/Admin/Scrips/index.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -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>
+
+