summaryrefslogtreecommitdiff
path: root/rt/share/html/Admin/Groups
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Admin/Groups')
-rw-r--r--rt/share/html/Admin/Groups/History.html5
-rw-r--r--rt/share/html/Admin/Groups/Memberships.html48
-rwxr-xr-xrt/share/html/Admin/Groups/Modify.html25
-rwxr-xr-xrt/share/html/Admin/Groups/index.html40
4 files changed, 81 insertions, 37 deletions
diff --git a/rt/share/html/Admin/Groups/History.html b/rt/share/html/Admin/Groups/History.html
index bc3ff950a..45df06938 100644
--- a/rt/share/html/Admin/Groups/History.html
+++ b/rt/share/html/Admin/Groups/History.html
@@ -48,9 +48,10 @@
<& /Admin/Elements/Header, Title => $title &>
<& /Elements/Tabs &>
-<& /Ticket/Elements/ShowHistory,
- Ticket => $GroupObj,
+<& /Elements/ShowHistory,
+ Object => $GroupObj,
ShowDisplayModes => 0,
+ DisplayPath => 'History.html',
&>
<%INIT>
diff --git a/rt/share/html/Admin/Groups/Memberships.html b/rt/share/html/Admin/Groups/Memberships.html
new file mode 100644
index 000000000..1910ff5c2
--- /dev/null
+++ b/rt/share/html/Admin/Groups/Memberships.html
@@ -0,0 +1,48 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+%# <sales@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/MembershipsPage, %ARGS &>
diff --git a/rt/share/html/Admin/Groups/Modify.html b/rt/share/html/Admin/Groups/Modify.html
index eb10d14bc..6c65ea058 100755
--- a/rt/share/html/Admin/Groups/Modify.html
+++ b/rt/share/html/Admin/Groups/Modify.html
@@ -72,18 +72,17 @@
% my $CFs = $Group->CustomFields;
% while (my $CF = $CFs->Next) {
<tr valign="top"><td align="right">
-<% loc($CF->Name) %>:
+<% $CF->Name %>:
</td><td>
<& /Elements/EditCustomField, CustomField => $CF,
- Object => $Group,
- ($Create ? (NamePrefix => 'Object-RT::Group--CustomField-')
- : () )&>
+ Object => $Group, &>
</td></tr>
% }
<tr>
<td colspan="2">
<input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br />
+<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
+<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this group)</&></label><br />
</td>
</tr>
% $m->callback( %ARGS, GroupObj => $Group, results => \@results );
@@ -104,7 +103,7 @@ if ($Create) {
$title = loc("Create a new group");
} else {
if ($id eq 'new' ) {
- my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => $Name );
+ my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => $Name );
if ($create_id) {
$id = $Group->Id;
push @results, $create_msg;
@@ -112,32 +111,32 @@ if ($Create) {
push @results, loc("Group could not be created: [_1]", $create_msg);
}
} else {
- $Group->Load($id) || Abort('Could not load group');
+ $Group->Load($id) || Abort('Could not load group');
}
if ($Group->Id) {
- $title = loc("Modify the group [_1]", $Group->Name);
+ $title = loc("Modify the group [_1]", $Group->Name);
}
# If the create failed
else {
- $title = loc("Create a new group");
- $Create = 1;
+ $title = loc("Create a new group");
+ $Create = 1;
}
}
if ($Group->Id) {
my @fields = qw(Description Name );
my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
- Object => $Group,
- ARGSRef => \%ARGS );
+ Object => $Group,
+ ARGSRef => \%ARGS );
push (@results,@fieldresults);
push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group );
# Warn about duplicate groups
my $dupcheck = RT::Groups->new(RT->SystemUser);
$dupcheck->LimitToUserDefinedGroups();
- $dupcheck->Limit( FIELD => 'Name', VALUE => $Group->Name );
+ $dupcheck->Limit( FIELD => 'Name', VALUE => $Group->Name, CASESENSITIVE => 0 );
if ($dupcheck->Count > 1) {
push @warnings, loc("There is more than one group with the name '[_1]'. This may cause inconsistency in parts of the admin interface, and therefore it's recommended you rename the conflicting groups.", $Group->Name);
}
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>