diff options
Diffstat (limited to 'rt/share/html/Admin/Groups/index.html')
-rwxr-xr-x | rt/share/html/Admin/Groups/index.html | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/rt/share/html/Admin/Groups/index.html b/rt/share/html/Admin/Groups/index.html index 43a1c6748..7298f28f4 100755 --- a/rt/share/html/Admin/Groups/index.html +++ b/rt/share/html/Admin/Groups/index.html @@ -53,18 +53,12 @@ <input type="hidden" name="GroupField" value="Name" /> <input type="hidden" name="GroupOp" value="LIKE" /> <&|/l&>Go to group</&> -<input type="text" name="GroupString" value="" id="autocomplete-GroupString" /> +<input type="text" name="GroupString" value="" data-autocomplete="Groups" id="autocomplete-GroupString" /> <script type="text/javascript"> jQuery(function(){ - jQuery("#autocomplete-GroupString").autocomplete({ - source: <% RT->Config->Get('WebPath') |n,j%>+"/Helpers/Autocomplete/Groups", - // Auto-submit once a group is chosen - select: function( event, ui ) { - jQuery(event.target).val(ui.item.value); - var form = jQuery(event.target).closest('form'); - form.find('input[name=GroupOp]').val('='); - form.submit(); - } + // Jump directly to the page if a group is chosen + jQuery("#autocomplete-GroupString").on("autocompleteselect", function( event, ui ) { + document.location = RT.Config.WebPath + "/Admin/Groups/Modify.html?id=" + ui.item.id; }); }); </script> @@ -72,7 +66,8 @@ jQuery(function(){ <form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Groups/index.html"> <&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><br /> -<input type="checkbox" class="checkbox" name="FindDisabledGroups" value="1" <% $FindDisabledGroups? 'checked="checked"': '' |n %> /> <&|/l&>Include disabled groups in listing.</&><br /> +<input type="checkbox" class="checkbox" id="FindDisabledGroups" name="FindDisabledGroups" value="1" <% $FindDisabledGroups? 'checked="checked"': '' |n %> /> +<label for="FindDisabledGroups"><&|/l&>Include disabled groups in listing.</&></label><br /> <div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div> </form> @@ -84,7 +79,7 @@ jQuery(function(){ <& /Elements/CollectionList, OrderBy => 'Name', Order => 'ASC', - Rows => 100, + Rows => $Rows, %ARGS, Format => $Format, Collection => $Groups, @@ -106,18 +101,18 @@ if ($FindDisabledGroups) { if (length $GroupString) { $caption = loc("Groups matching search criteria"); if ($GroupField =~ /^CustomField-(\d+)/) { - $Groups->LimitCustomField( - CUSTOMFIELD => $1, - OPERATOR => $GroupOp, - VALUE => $GroupString, - ); + $Groups->LimitCustomField( + CUSTOMFIELD => $1, + OPERATOR => $GroupOp, + VALUE => $GroupString, + ); } else { - $Groups->Limit( - FIELD => $GroupField, - OPERATOR => $GroupOp, - VALUE => $GroupString, - ); + $Groups->Limit( + FIELD => $GroupField, + OPERATOR => $GroupOp, + VALUE => $GroupString, + ); } RT::Interface::Web::Redirect(RT->Config->Get('WebURL')."Admin/Groups/Modify.html?id=".$Groups->First->id) if $Groups->Count == 1 and $Groups->First; @@ -127,6 +122,7 @@ else { } $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'}; +my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Groups'} || 50; </%INIT> <%ARGS> |