summaryrefslogtreecommitdiff
path: root/rt/html/Admin
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/Admin')
-rw-r--r--rt/html/Admin/CustomFields/GroupRights.html170
-rw-r--r--rt/html/Admin/CustomFields/Modify.html212
-rw-r--r--rt/html/Admin/CustomFields/Objects.html145
-rw-r--r--rt/html/Admin/CustomFields/UserRights.html168
-rw-r--r--rt/html/Admin/CustomFields/index.html76
-rw-r--r--rt/html/Admin/Elements/AddCustomFieldValue12
-rw-r--r--rt/html/Admin/Elements/CreateUserCalled6
-rw-r--r--rt/html/Admin/Elements/CustomFieldTabs116
-rw-r--r--rt/html/Admin/Elements/EditCustomField6
-rw-r--r--rt/html/Admin/Elements/EditCustomFieldValues50
-rw-r--r--rt/html/Admin/Elements/EditCustomFields222
-rw-r--r--rt/html/Admin/Elements/EditQueueWatchers9
-rw-r--r--rt/html/Admin/Elements/EditScrip6
-rw-r--r--rt/html/Admin/Elements/EditScrips10
-rw-r--r--rt/html/Admin/Elements/EditTemplates8
-rw-r--r--rt/html/Admin/Elements/EditUserComments6
-rwxr-xr-xrt/html/Admin/Elements/GlobalCustomFieldTabs93
-rw-r--r--rt/html/Admin/Elements/GroupTabs10
-rw-r--r--rt/html/Admin/Elements/Header8
-rw-r--r--rt/html/Admin/Elements/ListGlobalCustomFields6
-rw-r--r--rt/html/Admin/Elements/ListGlobalScrips36
-rw-r--r--rt/html/Admin/Elements/ModifyTemplate6
-rw-r--r--rt/html/Admin/Elements/ObjectCustomFields109
-rw-r--r--rt/html/Admin/Elements/PickCustomFields96
-rw-r--r--rt/html/Admin/Elements/PickObjects80
-rw-r--r--rt/html/Admin/Elements/QueueRightsForUser8
-rw-r--r--rt/html/Admin/Elements/QueueTabs17
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldLookupType58
-rw-r--r--rt/html/Admin/Elements/SelectCustomFieldType12
-rw-r--r--rt/html/Admin/Elements/SelectGroups6
-rw-r--r--rt/html/Admin/Elements/SelectModifyGroup6
-rw-r--r--rt/html/Admin/Elements/SelectModifyQueue6
-rw-r--r--rt/html/Admin/Elements/SelectModifyUser6
-rw-r--r--rt/html/Admin/Elements/SelectNewGroupMembers6
-rw-r--r--rt/html/Admin/Elements/SelectRights19
-rw-r--r--rt/html/Admin/Elements/SelectScrip6
-rw-r--r--rt/html/Admin/Elements/SelectScripAction10
-rw-r--r--rt/html/Admin/Elements/SelectScripCondition10
-rw-r--r--rt/html/Admin/Elements/SelectSingleOrMultiple6
-rw-r--r--rt/html/Admin/Elements/SelectStage11
-rw-r--r--rt/html/Admin/Elements/SelectTemplate6
-rw-r--r--rt/html/Admin/Elements/SelectUsers6
-rw-r--r--rt/html/Admin/Elements/SystemTabs8
-rw-r--r--rt/html/Admin/Elements/Tabs13
-rwxr-xr-xrt/html/Admin/Elements/ToolTabs6
-rw-r--r--rt/html/Admin/Elements/UserTabs75
-rw-r--r--rt/html/Admin/Global/CustomField.html (renamed from rt/html/Admin/Users/CustomFields.html)57
-rw-r--r--rt/html/Admin/Global/CustomFields.html (renamed from rt/html/Admin/Groups/History.html)35
-rw-r--r--rt/html/Admin/Global/CustomFields/Groups.html11
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Tickets.html11
-rwxr-xr-xrt/html/Admin/Global/CustomFields/Queue-Transactions.html11
-rw-r--r--rt/html/Admin/Global/CustomFields/Users.html11
-rw-r--r--rt/html/Admin/Global/CustomFields/index.html91
-rw-r--r--rt/html/Admin/Global/GroupRights.html6
-rw-r--r--rt/html/Admin/Global/Scrip.html6
-rw-r--r--rt/html/Admin/Global/Scrips.html6
-rw-r--r--rt/html/Admin/Global/Template.html6
-rw-r--r--rt/html/Admin/Global/Templates.html8
-rw-r--r--rt/html/Admin/Global/UserRights.html6
-rw-r--r--rt/html/Admin/Global/index.html10
-rw-r--r--rt/html/Admin/Groups/CustomFields.html46
-rw-r--r--rt/html/Admin/Groups/GroupRights.html6
-rw-r--r--rt/html/Admin/Groups/Members.html10
-rw-r--r--rt/html/Admin/Groups/Modify.html26
-rw-r--r--rt/html/Admin/Groups/UserRights.html6
-rw-r--r--rt/html/Admin/Groups/index.html54
-rw-r--r--rt/html/Admin/Queues/CustomField.html8
-rw-r--r--rt/html/Admin/Queues/CustomFields.html35
-rw-r--r--rt/html/Admin/Queues/GroupRights.html6
-rw-r--r--rt/html/Admin/Queues/Modify.html12
-rw-r--r--rt/html/Admin/Queues/People.html8
-rw-r--r--rt/html/Admin/Queues/Scrip.html6
-rw-r--r--rt/html/Admin/Queues/Scrips.html6
-rw-r--r--rt/html/Admin/Queues/Template.html6
-rw-r--r--rt/html/Admin/Queues/Templates.html6
-rw-r--r--rt/html/Admin/Queues/UserRights.html6
-rw-r--r--rt/html/Admin/Queues/index.html15
-rw-r--r--rt/html/Admin/Tools/Configuration.html8
-rw-r--r--rt/html/Admin/Tools/index.html6
-rw-r--r--rt/html/Admin/Users/History.html66
-rw-r--r--rt/html/Admin/Users/Memberships.html65
-rw-r--r--rt/html/Admin/Users/Modify.html174
-rw-r--r--rt/html/Admin/Users/index.html54
-rw-r--r--rt/html/Admin/autohandler51
-rw-r--r--rt/html/Admin/index.html69
85 files changed, 602 insertions, 2395 deletions
diff --git a/rt/html/Admin/CustomFields/GroupRights.html b/rt/html/Admin/CustomFields/GroupRights.html
deleted file mode 100644
index 380fee479..000000000
--- a/rt/html/Admin/CustomFields/GroupRights.html
+++ /dev/null
@@ -1,170 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
- id => $id,
- current_tab => "Admin/CustomFields/GroupRights.html?id=".$id,
- Title => $title
-&>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
-
-
-<h1><&|/l&>System groups</&></h1>
-<TABLE>
-% $Groups = RT::Groups->new($session{'CurrentUser'});
-% $Groups->LimitToSystemInternalGroups();
-% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% loc($Group->Type) %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
-</TABLE>
-<h1><&|/l&>User defined groups</&></h1>
-<TABLE>
-% $Groups = RT::Groups->new($session{'CurrentUser'});
-% $Groups->LimitToUserDefinedGroups();
-% while (my $Group = $Groups->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $Group->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
-</TABLE>
-
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
-
- </FORM>
-
-<%INIT>
-
-
-
-
-
-
-if (!defined $id) {
- $m->comp("/Elements/Error", Why => loc("No CustomField defined"));
-}
-
-my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
-$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load CustomField [_1]",$id));
-
-my $Groups;
-
- my ( $ACL, @results );
-
- foreach my $arg (keys %ARGS) {
- if ($arg =~ /GrantRight-(\d+)-(.*?)-(\d+)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $rights = $ARGS{$arg};
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be granted for [_1]", $object_type));
- next;
- }
-
- my @rights = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} : ($ARGS{$arg});
- foreach my $right (@rights) {
- next unless ($right);
- my ($val, $msg) = $principal->GrantRight(Object => $obj, Right => $right);
- push (@results, $msg);
- }
- }
- elsif ($arg =~ /RevokeRight-(\d+)-(.*?)-(\d+)-(.*?)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $right = $4;
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- next unless ($right);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be revoked for [_1]", $object_type));
- next;
- }
- my ($val, $msg) = $principal->RevokeRight(Object => $obj, Right => $right);
- push (@results, $msg);
- }
-}
-
-my $title = loc('Modify group rights for custom field [_1]', $CustomFieldObj->Name);
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/Modify.html b/rt/html/Admin/CustomFields/Modify.html
deleted file mode 100644
index 4c3c92114..000000000
--- a/rt/html/Admin/CustomFields/Modify.html
+++ /dev/null
@@ -1,212 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
- id => $CustomFieldObj->Id ,
- current_tab => $current_tab,
- Title => $title &>
-<& /Elements/ListActions, actions => \@results &>
-
-
-<FORM METHOD="POST" ACTION="Modify.html" NAME="ModifyCustomField">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<%$id %>">
-<table>
-<tr>
-<td class="label"><&|/l&>Name</&></td>
-<td><input name="Name" VALUE="<%$CustomFieldObj->Name%>" SIZE=20></td></tr>
-<tr>
-<td class="label"><&|/l&>Description</&></td>
-<td><input name="Description" VALUE="<%$CustomFieldObj->Description%>" SIZE=80></td>
-</tr>
-
-<tr>
-<td class="label"><&|/l&>Type</&></td>
-<td><& /Admin/Elements/SelectCustomFieldType,
- Name => "TypeComposite",
- Default => $CustomFieldObj->TypeComposite, &>
-</td>
-</tr>
-<tr>
-<td class="label"><&|/l&>Applies to</&></td>
-<td><& /Admin/Elements/SelectCustomFieldLookupType,
- Name => "LookupType",
- Default => $CustomFieldObj->LookupType, &>
-</td>
-</tr>
-<tr>
-<td class="label">&nbsp;</td>
-<td>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
-</td>
-</tr>
-</table>
-<BR>
-% if ($CustomFieldObj->Id && $CustomFieldObj->Type =~ /^Select/i) {
-<H2><&|/l&>Values</&></H2>
-<div>
-<& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &>
-<& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &>
-</div>
-% }
-<&/Elements/Submit&>
-</FORM>
-
-
-
-<%INIT>
-
-
-
-my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
-my ( $title, @results, $EnabledChecked, $Disabled);
-$EnabledChecked = "CHECKED";
-
-if ( !$id ) {
- $title = loc("Create a CustomField");
- $id = 'new';
-}
-else {
-
- if ( $id eq 'new' ) {
- my ( $val, $msg ) = $CustomFieldObj->Create(Name => $Name,
- TypeComposite => $TypeComposite,
- LookupType => $LookupType,
- Description => $Description,);
- $m->comp("/Elements/Error", Why => loc( "Could not create CustomField", $msg ) ) unless ($val);
- push @results, $msg;
- $title = loc( 'Created CustomField [_1]', $CustomFieldObj->Name() );
- }
- else {
- $CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc('No CustomField') );
- $title = loc( 'Editing CustomField [_1]', $CustomFieldObj->Name() );
-
- my @attribs = qw( Name TypeComposite LookupType Description);
- my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $CustomFieldObj,
- ARGSRef => \%ARGS );
-
- push @results, @aresults;
-
- #we're asking about enabled on the web page but really care about disabled.
- if ($Enabled == 1) {
- $Disabled = 0;
- }
- else {
- $Disabled = 1;
- }
- if ( ($SetEnabled) and ( $Disabled != $CustomFieldObj->Disabled) ) {
- my ($code, $msg) = $CustomFieldObj->SetDisabled($Disabled);
- push @results, loc('Enabled status: [_1]', loc_fuzzy($msg));
- }
-
- if ($CustomFieldObj->Disabled()) {
- $EnabledChecked ="";
- }
- }
-
- $id = $CustomFieldObj->id;
-}
-
-
-
-
-my $paramtag = "CustomField-".$CustomFieldObj->Id."-Value-";
-# Delete any fields that want to be deleted
-foreach my $key (keys %ARGS) {
-
- next unless ($key =~ /^Delete-$paramtag(\d+)$/);
- my ($val, $msg) = $CustomFieldObj->DeleteValue($1);
- push (@results, $msg);
-
-
-}
-# Update any existing values
-my $values = $CustomFieldObj->ValuesObj;
-while (my $value = $values->Next) {
- foreach my $attr qw(Name Description SortOrder) {
- my $param = $paramtag.$value->Id."-".$attr;
-
- if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) {
- my $mutator = "Set$attr";
- my ($id, $msg) = $value->$mutator($ARGS{$param});
- push (@results, $msg);
- }
- }
-
-
-}
-
-
-
-# Add any new values
-if ($ARGS{$paramtag."new-Name"}) {
- my ($id, $msg) = $CustomFieldObj->AddValue ( Name => $ARGS{$paramtag."new-Name"},
- Description => $ARGS{$paramtag."new-Description"},
- SortOrder => $ARGS{$paramtag."new-SortOrder"});
- push (@results, $msg);
-}
-
-my $current_tab;
-if ($ARGS{'Create'}){
- $current_tab = "Admin/CustomFields/Modify.html?Create=1";
-} else {
- $current_tab = "Admin/CustomFields/Modify.html?id=".$id;
- }
-
-
-</%INIT>
-<%ARGS>
-$id => undef
-$TypeComposite => undef
-$LookupType => undef
-$MaxValues => undef
-$SortOrder => undef
-$Description => undef
-$Name => undef
-$SetEnabled => undef
-$Enabled => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/Objects.html b/rt/html/Admin/CustomFields/Objects.html
deleted file mode 100644
index 8f9e3657b..000000000
--- a/rt/html/Admin/CustomFields/Objects.html
+++ /dev/null
@@ -1,145 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs,
- id => $id,
- current_tab => "Admin/CustomFields/Objects.html?id=".$id,
- Title => $title
- &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM ACTION="Objects.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $id %>">
-<INPUT TYPE=HIDDEN NAME="UpdateObjs" VALUE="1">
-
-<h2><&|/l&>Selected objects</&></h2>
-<& /Admin/Elements/PickObjects, Objects => \@AssignedObjs, id => $id, Checked => 1 &>
-<h2><&|/l&>Unselected objects</&></h2>
-<& /Admin/Elements/PickObjects, Objects => \@UnassignedObjs, id => $id &>
-
-<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
-</FORM>
-
-<%INIT>
-my $CF = RT::CustomField->new($session{'CurrentUser'});
-$CF->Load($id) or Abort(loc("Could not load CustomField [_1]"), $id);
-my $LookupType = $CF->LookupType;
-$LookupType =~ /^(.*?)-/ ||
- Abort(loc("Object of type [_1] cannot take custom fields", $LookupType));
-
-my $Class = $1;
-my $CollectionClass;
-if (UNIVERSAL::can($Class.'Collection', 'new') ) {
-$CollectionClass = $Class.'Collection';
-
-} elsif (UNIVERSAL::can($Class.'es', 'new') ) {
- $CollectionClass = $Class.'es';
-
-} elsif (UNIVERSAL::can($Class.'s', 'new') ) {
- $CollectionClass = $Class.'s';
-
-} else {
- Abort(loc("Can't find a collection class for '[_1]'", $Class));
-}
-
-
-my $title = loc('Modify associated objects for [_1]', $CF->Name);
-
-my $Objects = $CollectionClass->new($session{'CurrentUser'});
-my (@results);
-my (@AssignedObjs, @UnassignedObjs);
-
-$Objects->UnLimit;
-$Objects->OrderBy( FIELD => 'Name' );
-
-
-my $ObjectCFs;
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToCustomField($id);
-
-my %seen;
-while (my $OCF = $ObjectCFs->Next) {
- $seen{$OCF->ObjectId}++;
-}
-
-while (my $obj = $Objects->Next) {
- my $obj_id = $obj->Id;
-
- if ($UpdateObjs) {
- # Go through and delete all the custom field relationships that this object
- # no longer has
- my $key = "Object-$obj_id-CF-$id";
- if ($ARGS{$key}) {
- if (!$seen{$obj_id}) {
- my ($val, $msg) = $CF->AddToObject($obj);
- push (@results, $msg);
- push @UnassignedObjs, $obj if !$val;
- }
- }
- else {
- push @UnassignedObjs, $obj;
- if ($seen{$obj_id}) {
- my ($val, $msg) = $CF->RemoveFromObject($obj);
- push (@results, $msg);
- pop @UnassignedObjs if !$val;
- }
- }
- }
- elsif (!$seen{$obj_id}) {
- push @UnassignedObjs, $obj;
- }
- next if @UnassignedObjs and $UnassignedObjs[-1] == $obj;
- push @AssignedObjs, $obj;
-}
-
-</%INIT>
-<%ARGS>
-$id => undef
-$FindDisabledObjects => 0
-$UpdateObjs => 0
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/UserRights.html b/rt/html/Admin/CustomFields/UserRights.html
deleted file mode 100644
index e2df3a058..000000000
--- a/rt/html/Admin/CustomFields/UserRights.html
+++ /dev/null
@@ -1,168 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/CustomFieldTabs, id => $id,
-current_tab => "Admin/CustomFields/UserRights.html?id=".$id,
-Title => $title, &>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $CustomFieldObj->id %>">
-
-
-<TABLE>
-
-% while (my $Member = $Users->Next()) {
-% my $UserObj = $Member->MemberObj->Object();
-% my $group = RT::Group->new($session{'CurrentUser'});
-% $group->LoadACLEquivalenceGroup($Member->MemberObj);
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $UserObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId,
- Object => $CustomFieldObj &>
- </TD>
- </TR>
-% }
- </TABLE>
-
- <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
-
- </FORM>
-
-<%INIT>
-
- #Update the acls.
- my @results;
-foreach my $arg (keys %ARGS) {
- if ($arg =~ /GrantRight-(\d+)-(.*?)-(\d+)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $rights = $ARGS{$arg};
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
-
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be granted for [_1]",
-$object_type));
- next;
- }
-
- my @rights = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} :
-($ARGS{$arg});
- foreach my $right (@rights) {
- next unless ($right);
- my ($val, $msg) = $principal->GrantRight(Object => $obj, Right
-=> $right);
- push (@results, $msg);
- }
- }
- elsif ($arg =~ /RevokeRight-(\d+)-(.*?)-(\d+)-(.*?)$/) {
- my $principal_id = $1;
- my $object_type = $2;
- my $object_id = $3;
- my $right = $4;
-
- my $principal = RT::Principal->new($session{'CurrentUser'});
- $principal->Load($principal_id);
- next unless ($right);
- my $obj;
-
- if ($object_type eq 'RT::CustomField') {
- $obj = RT::CustomField->new($session{'CurrentUser'});
- $obj->Load($object_id);
- } else {
- push (@results, loc("System Error").
- loc("Rights could not be revoked for [_1]",
-$object_type));
- next;
- }
- my ($val, $msg) = $principal->RevokeRight(Object => $obj, Right =>
-$right);
- push (@results, $msg);
- }
-}
-
-
-# {{{ Deal with setting up the display of current rights.
-
-
-
-if (!defined $id) {
- $m->comp("/Elements/Error", Why => loc("No Class defined"));
-}
-
-my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
-$CustomFieldObj->Load($id) || $m->comp("/Elements/Error", Why => loc("Couldn't load Class [_1]",$id));
-
-# Find out which users we want to display ACL selects for
-my $Privileged = RT::Group->new($session{'CurrentUser'});
-$Privileged->LoadSystemInternalGroup('Privileged');
-my $Users = $Privileged->MembersObj();
-
-
-my $title = loc('Modify user rights for custom field [_1]', $CustomFieldObj->Name);
-
-# }}}
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$UserString => undef
-$UserOp => undef
-$UserField => undef
-</%ARGS>
diff --git a/rt/html/Admin/CustomFields/index.html b/rt/html/Admin/CustomFields/index.html
deleted file mode 100644
index 9854fb0ec..000000000
--- a/rt/html/Admin/CustomFields/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => loc('Select a Custom Field') &>
-<& /Admin/Elements/CustomFieldTabs,
- current_tab => 'Admin/CustomFields/',
- Title => loc('Select a Custom Field') &>
-
-% my $prev_lookup = '';
-% while (my $CustomFieldObj = $CustomFields->Next) {
-% $CustomFieldObj->CurrentUserHasRight('AdminCustomField') or next;
-% my $lookup = $CustomFieldObj->FriendlyLookupType;
-% if ($lookup ne $prev_lookup) {
-% if ($prev_lookup) {
-</UL>
-% }
-<H2><% loc("Custom Fields for [_1]", $lookup) %></H2>
-<UL>
-% $prev_lookup = $lookup;
-% }
-%
-<LI>
-<A HREF="Modify.html?id=<%$CustomFieldObj->id()%>"><%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></a>
-</LI>
-% }
-% if ($prev_lookup) {
-</UL>
-% }
-
-<%INIT>
-my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
-$CustomFields->UnLimit();
-$CustomFields->OrderByCols( { FIELD => 'LookupType' }, { FIELD => 'Name' } );
-</%INIT>
diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue
index 3e3f414b3..0e59fe320 100644
--- a/rt/html/Admin/Elements/AddCustomFieldValue
+++ b/rt/html/Admin/Elements/AddCustomFieldValue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,20 +42,20 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<b><&|/l&>Add Value</&></b></b></b></b>
<TABLE BORDER="0">
<TR><TD><small>
<&|/l&>Sort</&>:<br>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-new-SortOrder" >
+<input name="CustomField-<% $CustomField->Id %>-AddValue-SortOrder" size="5">
</TD>
<TD><small>
<&|/l&>Name</&>:<br>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-new-Name" >
+<input size=20 name="CustomField-<% $CustomField->Id %>-AddValue-Name">
</TD>
<TD><small>
<&|/l&>Description</&>:<br>
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-new-Description">
+<input size="60" name="CustomField-<% $CustomField->Id %>-AddValue-Description">
</TD></TR>
</TABLE>
diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled
index 0dc6ac792..01fa9fe94 100644
--- a/rt/html/Admin/Elements/CreateUserCalled
+++ b/rt/html/Admin/Elements/CreateUserCalled
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Users/Create.html">
<&|/l&>New user called</&> <INPUT NAME="Name" size=10><input type=submit value="<&|/l&>Create</&>">
</form>
diff --git a/rt/html/Admin/Elements/CustomFieldTabs b/rt/html/Admin/Elements/CustomFieldTabs
deleted file mode 100644
index d7acf33cc..000000000
--- a/rt/html/Admin/Elements/CustomFieldTabs
+++ /dev/null
@@ -1,116 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Tabs,
- current_tab => 'Admin/CustomFields/',
- subtabs => $tabs,
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
-my $tabs;
-
-if ($id) {
- my $cf = RT::CustomField->new( $session{'CurrentUser'} );
- $cf->Load($id);
- $tabs = {
- this => {
- title => $cf->Name,
- path => "Admin/CustomFields/Modify.html?id=" . $id,
- current_subtab => $current_tab,
-
- subtabs => {
-
- C => { title => loc('Basics'),
- path => "Admin/CustomFields/Modify.html?id=" . $id,
- },
- F => { title => loc('Group Rights'),
- path => "Admin/CustomFields/GroupRights.html?id="
- . $id, },
- G => {
- title => loc('User Rights'),
- path => "Admin/CustomFields/UserRights.html?id=" . $id,
- },
-
- } }
-
- };
-
-
- if ($cf->LookupType =~ /^RT::Queue/io) {
- $tabs->{'this'}->{subtabs}->{D} = {
- title => loc('Applies to'),
- path => "Admin/CustomFields/Objects.html?id=" . $id,
- };
- }
-}
-
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminCustomField')) {
- $tabs->{"A"} = { title => loc('Select custom field'),
- path => "Admin/CustomFields/",
- };
- $tabs->{"B"} = { title => loc('New custom field'),
- path => "Admin/CustomFields/Modify.html?Create=1",
- separator => 1,
- };
-}
-
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-foreach my $tab (sort keys %{$tabs->{'this'}->{'subtabs'}}) {
- if ($tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'subtabs'} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{'current_subtab'} = $current_subtab;
- }
-}
-if( $id ) { $current_tab = "Admin/CustomFields/Modify.html?id=" . $id }
-</%INIT>
-<%ARGS>
-$Title => undef
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField
index d8c5b29b2..5657d43fd 100644
--- a/rt/html/Admin/Elements/EditCustomField
+++ b/rt/html/Admin/Elements/EditCustomField
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@results &>
diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues
index 9cc3858b9..79b6501e1 100644
--- a/rt/html/Admin/Elements/EditCustomFieldValues
+++ b/rt/html/Admin/Elements/EditCustomFieldValues
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,42 +42,22 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-% if (!$values->Count) {
-<p><em><&|/l&>(no values)</&></em></p>
-% return;
-% }
+%# }}} END BPS TAGGED BLOCK
<i><&|/l&>(Check box to delete)</&></i>
-<table>
-<tr>
-<td>&nbsp;</td>
-<td><&|/l&>Sort</&></td>
-<td><&|/l&>Name</&></td>
-<td><&|/l&>Description</&></td>
-</tr>
-% while (my $value = $values->Next) {
-<tr>
-<td>
-<input type="checkbox" name="Delete-CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>">
-</td>
-<td>
-<input size=3 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-SortOrder" value="<%$value->SortOrder%>">
-</td>
-<td>
-<input type="text" size=30 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Name" value="<%$value->Name%>">
-</td>
-<td>
-<font size="-1">
-<input type="text" size=50 name="CustomField-<%$CustomField->Id%>-Value-<%$value->Id%>-Description" value="<%$value->Description%>">
-</font>
-</td>
-</tr>
+<ul>
+% while (my $v = $values->Next) {
+<li>
+<INPUT TYPE="text" SIZE="2" NAME="CustomField-<%$CustomField->Id%>-SortOrder<%$v->Id()%>" VALUE="<%$v->SortOrder()%>">
+<input type="checkbox" name="CustomField-<%$CustomField->Id%>-DeleteValue" value="<%$v->id%>">
+<%$v->Name%>
+% if ($v->Description) {
+<i>(<%$v->Description%>)</i>
+% }
+</li>
% }
-</table>
+</ul>
<%init>
-
-my $values = $CustomField->ValuesObj();
-
+my $values = $CustomField->Values();
</%init>
<%args>
$CustomField => undef
diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields
index 1cd3df568..d901b216e 100644
--- a/rt/html/Admin/Elements/EditCustomFields
+++ b/rt/html/Admin/Elements/EditCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,64 +42,95 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM ACTION="<%$RT::WebPath%><% $m->request_comp->path |n %>" METHOD="POST" NAME="EditCustomFields">
-<INPUT TYPE=HIDDEN NAME="id" VALUE="<% $Object->Id %>"/>
-<INPUT TYPE=HIDDEN NAME="ObjectType" VALUE="<% $ObjectType %>"/>
-<INPUT TYPE=HIDDEN NAME="SubType" VALUE="<% $SubType %>"/>
-<INPUT TYPE=HIDDEN NAME="UpdateCFs" VALUE="1"/>
-
-% if ($Object->Id) {
-<h2><&|/l&>Global Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => \@GlobalCFs, ReadOnly => 1, id => $id, SubType => $SubType &>
+%# }}} END BPS TAGGED BLOCK
+<& /Elements/ListActions, actions => \@actions &>
+
+<TABLE>
+<TR>
+<TD VALIGN=TOP>
+<h2><%$caption%></h2>
+</TD></TR></TABLE>
+% if ($CustomFields->Count == 0 ) {
+<P><i><&|/l&>(No custom fields)</&></i></P>
+% } else {
+<TABLE cellspacing=0 cellpadding=2>
+% my $count;
+% while (my $CustomFieldObj = $CustomFields->Next) {
+<TR>
+ <TD valign="TOP">
+% if ($CustomFieldObj->Name) {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><b><%$CustomFieldObj->Name%></b></a><br>
+% } else {
+ <A HREF="CustomField.html?Queue=<%$id%>&CustomField=<%$CustomFieldObj->id()%>"><i>(<%loc("no name")%>)</i></a><br>
+% }
+ <%$CustomFieldObj->Description%>
+ </TD>
+ <TD valign="TOP">
+ <i><% $CustomFieldObj->FriendlyType %></i>
+ </TD>
+% # show 'move up' unless it's the first item
+% if ($count++) {
+ <TD valign="TOP">
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>
+% } else {
+ <TD valign="TOP" ALIGN=RIGHT>
+% }
+
+% # show 'move down' unless it's the last item
+% if (!$CustomFields->IsLast) {
+% $m->print(' | ') if $count > 1;
+ <a href="CustomFields.html?id=<%$id%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>
+% }
+</TD>
+</TR>
% }
-<h2><&|/l&>Selected Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => [$ObjectCFs->CustomFields], id => $id, Checked => 1, SubType => $SubType &>
-<h2><&|/l&>Unselected Custom Fields</&></h2>
-<& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &>
-<& /Elements/Submit, CheckAll => 1, ClearAll => 1 &>
+</TABLE>
+% }
+<FORM METHOD=GET ACTION="CustomFields.html">
+% if ($id) {
+<INPUT TYPE="Hidden" NAME="id" VALUE="<%$id%>">
+% }
+<input type="checkbox" name="FindDisabledCustomFields"> <&|/l&>Include disabled custom fields in listing.</&>
+<input type=submit value="<&|/l&>Go!</&>">
</FORM>
<%INIT>
my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
-my @results;
-my (@GlobalCFs, @UnassignedCFs);
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
+my $caption;
-my $id = $Object->Id;
-if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) {
- $m->out('<P><i>', loc('(No custom fields)'), '</i></P>');
- return;
+if ($id) {
+ $QueueObj->Load($id);
}
-my $lookup = $ObjectType;
-$lookup .= "-$SubType" if $SubType;
-
-$CustomFields->LimitToLookupType($lookup);
-$CustomFields->OrderBy( FIELD => 'Name' );
-
-
-my ($GlobalCFs, $ObjectCFs);
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToObjectId($id);
-$ObjectCFs->LimitToLookupType($lookup);
+if ($QueueObj->id) {
+ $CustomFields->LimitToQueue($id);
+}
+else {
+ $CustomFields->LimitToGlobal();
+}
+
+if ($FindDisabledCustomFields) {
+ $caption = loc("All Custom Fields");
+ $CustomFields->{'find_disabled_rows'} = 1;
+} else {
+ $caption = loc("Enabled Custom Fields");
+}
# {{{ deal with moving sortorder of custom fields
if ($CustomField and $Move) {
- my $SourceObj = RT::ObjectCustomField->new($session{'CurrentUser'});
- $SourceObj->LoadByCols( ObjectId => $id, CustomField => $CustomField );
+ my $SourceObj = RT::CustomField->new($session{'CurrentUser'});
+ $SourceObj->Load($CustomField) || Abort(loc('No CustomField'));
my $TargetObj;
my $target_order = $SourceObj->SortOrder + $Move;
- while (my $ObjectCF = $ObjectCFs->Next) {
- my $this_order = $ObjectCF->SortOrder;
+ while (my $CustomFieldObj = $CustomFields->Next) {
+ my $this_order = $CustomFieldObj->SortOrder;
# if we have an exact match, finish the loop now
- ($TargetObj = $ObjectCF, last) if $this_order == $target_order;
+ ($TargetObj = $CustomFieldObj, last) if $this_order == $target_order;
# otherwise, we need to apropos toward the general direction
# ... first, check the sign is correct
@@ -113,7 +144,7 @@ if ($CustomField and $Move) {
next if $orig_delta < $this_delta;
}
- $TargetObj = $ObjectCF;
+ $TargetObj = $CustomFieldObj;
}
if ($TargetObj) {
@@ -122,68 +153,83 @@ if ($CustomField and $Move) {
$TargetObj->SetSortOrder($s);
$SourceObj->SetSortOrder($t);
# because order changed, we must redo search for subsequent uses
+ $CustomFields->RedoSearch;
}
- $ObjectCFs->GotoFirstItem;
+ $CustomFields->GotoFirstItem;
}
# }}}
-if ($id) {
- $GlobalCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
- $GlobalCFs->LimitToObjectId(0);
- $GlobalCFs->LimitToLookupType($lookup);
-}
-
-while (my $cf = $CustomFields->Next) {
- my $cf_id = $cf->Id;
-
- if ($GlobalCFs and $GlobalCFs->HasEntryForCustomField($cf_id)) {
- push @GlobalCFs, $cf;
- next;
+# {{{ now process the 'copy queue' action
+my @actions;
+if ($Source and $Source ne $id) {
+ my $SourceQueue = RT::Queue->new($session{'CurrentUser'});
+ $SourceQueue->Load($Source) || Abort(loc("Couldn't load queue"));
+ my $SourceCustomFields = RT::CustomFields->new($session{'CurrentUser'});
+ $SourceCustomFields->LimitToQueue($SourceQueue->id);
+
+ # delete old fields
+ foreach my $CustomFieldObj ( @{$CustomFields->ItemsArrayRef} ) {
+ $CustomFieldObj->Delete;
}
- if ($UpdateCFs) {
- # Go through and delete all the custom field relationships that this object
- # no longer has
- my $key = "Object-$id-CF-$cf_id";
- if ($ARGS{$key}) {
- if (!$ObjectCFs->HasEntryForCustomField($cf_id)) {
- my ($val, $msg) = $cf->AddToObject($Object);
- push (@results, $msg);
- push @UnassignedCFs, $cf if !$val;
- }
- }
- else {
- push @UnassignedCFs, $cf;
- if ($ObjectCFs->HasEntryForCustomField($cf_id)) {
- my ($val, $msg) = $cf->RemoveFromObject($Object);
- push (@results, $msg);
- pop @UnassignedCFs if !$val;
- }
+ # add new fields
+ while (my $SourceCustomFieldObj = $SourceCustomFields->Next) {
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ my ($val, $msg) = $CustomFieldObj->Create(
+ id => $SourceCustomFieldObj->id,
+ Queue => $id,
+ Name => $SourceCustomFieldObj->Name,
+ Type => $SourceCustomFieldObj->Type,
+ Description => $SourceCustomFieldObj->Description,
+ );
+ Abort(loc("Could not create CustomField") . ": $msg") unless ($val);
+ push @actions, $msg;
+
+ $CustomFieldObj->SetSortOrder($SourceCustomFieldObj->SortOrder);
+
+ # add new values
+ my $values = $SourceCustomFieldObj->Values();
+ while (my $v = $values->Next) {
+ my ( $addval, $addmsg ) = $CustomFieldObj->AddValue(
+ Name => $v->Name,
+ Description => $v->Description,
+ SortOrder => $v->SortOrder
+ );
}
}
- elsif (!$ObjectCFs->HasEntryForCustomField($cf_id)) {
- push @UnassignedCFs, $cf;
- }
- else {
- }
+
+ # because content changed, we must redo search for subsequent uses
+ $CustomFields->RedoSearch;
+ $CustomFields->GotoFirstItem;
}
+# }}}
-# redo search...
-$ObjectCFs = RT::ObjectCustomFields->new($session{'CurrentUser'});
-$ObjectCFs->UnLimit;
-$ObjectCFs->LimitToObjectId($id);
-$ObjectCFs->LimitToLookupType($lookup);
+# {{{ deal with deleting existing custom fields
+foreach my $key (keys %ARGS) {
+ # {{{ if we're trying to delete the custom field
+ if ($key =~ /^DeleteCustomField-(\d+)/) {
+ my $id = $1;
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ $CustomFieldObj->Load($id);
+ my ($retval, $msg) = $CustomFieldObj->Delete;
+ if ($retval) {
+ push @actions, loc("Custom field deleted");
+ }
+ else {
+ push @actions, $msg;
+ }
+ }
+ # }}}
+}
+# }}}
</%INIT>
<%ARGS>
+$id => 0
$title => undef
$Move => undef
$Source => undef
$CustomField => undef
$FindDisabledCustomFields => undef
-$UpdateCFs => 0
-$Object
-$ObjectType
-$SubType => ''
</%ARGS>
diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers
index c93bf81f5..f6559e7ad 100644
--- a/rt/html/Admin/Elements/EditQueueWatchers
+++ b/rt/html/Admin/Elements/EditQueueWatchers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%if ($Members->Count == 0 ) {
<ul>
<li><i><&|/l&>none</&></i>
@@ -51,7 +51,8 @@
<ul>
% while (my $watcher=$Members->Next) {
<li>
-<INPUT TYPE=CHECKBOX NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+<INPUT TYPE=CHECKBOX
+ NAME="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>"
UNCHECKED>
% if ($watcher->MemberObj->IsUser) {
<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
diff --git a/rt/html/Admin/Elements/EditScrip b/rt/html/Admin/Elements/EditScrip
index 907ae9a92..4207114fd 100644
--- a/rt/html/Admin/Elements/EditScrip
+++ b/rt/html/Admin/Elements/EditScrip
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
diff --git a/rt/html/Admin/Elements/EditScrips b/rt/html/Admin/Elements/EditScrips
index 9526118b5..8959f6c70 100644
--- a/rt/html/Admin/Elements/EditScrips
+++ b/rt/html/Admin/Elements/EditScrips
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,13 +42,13 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
<form action="Scrips.html" method="post">
<input type="hidden" name="id" value="<%$id%>">
-<h2><&|/l&>Current Scrips</&></h2>
+<P><&|/l&>Current Scrips</&>:</P>
% if ($Scrips->Count == 0 ) {
<P><i><&|/l&>(No scrips)</&></i></P>
% } else {
@@ -58,7 +58,7 @@
% while (my $scrip = $Scrips->Next ) {
<TR>
<TD>
-<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>" value="1">
+<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>">
</TD>
<TD>
<a href="Scrip.html?id=<%$scrip->Id%>&Queue=<%$id%>"><% $scrip->Description || "<i>(".loc('no value').")</i>" |n %></a><br>
diff --git a/rt/html/Admin/Elements/EditTemplates b/rt/html/Admin/Elements/EditTemplates
index 207ffd001..6ac56c235 100644
--- a/rt/html/Admin/Elements/EditTemplates
+++ b/rt/html/Admin/Elements/EditTemplates
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/ListActions, actions => \@actions &>
<FORM METHOD=GET ACTION="Templates.html">
@@ -63,7 +63,7 @@
% while (my $TemplateObj = $Templates->Next) {
<TR>
<TD>
-<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>" value="1">
+<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>">
</TD>
<TD>
<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
diff --git a/rt/html/Admin/Elements/EditUserComments b/rt/html/Admin/Elements/EditUserComments
index fb96dc09a..bc23f77fe 100644
--- a/rt/html/Admin/Elements/EditUserComments
+++ b/rt/html/Admin/Elements/EditUserComments
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => "Comments about $name" &>
<&|/l&>These comments aren't generally visible to the user</&>:<br>
<input type="hidden" name="id" value="<%$id%>">
diff --git a/rt/html/Admin/Elements/GlobalCustomFieldTabs b/rt/html/Admin/Elements/GlobalCustomFieldTabs
deleted file mode 100755
index 8d4eaca23..000000000
--- a/rt/html/Admin/Elements/GlobalCustomFieldTabs
+++ /dev/null
@@ -1,93 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/SystemTabs, subtabs => $tabs,
- current_tab => 'Admin/Global/CustomFields/index.html',
- current_subtab => $current_tab,
- Title => $Title &>
-<%INIT>
-
-
- my $tabs = {
-
- A => { title => loc('Users'),
- text => loc('Modify scrips which apply to all queues'),
- path => 'Admin/Global/CustomFields/Users.html',
- },
- B => { title => loc('Groups'),
- text => loc('Edit system templates'),
- path => 'Admin/Global/CustomFields/Groups.html',
- },
-
- F => { title => loc('Tickets'),
- text => loc('Modify global custom fields'),
- path => 'Admin/Global/CustomFields/Queue-Tickets.html',
- },
-
- G => { title => loc('Ticket Transactions'),
- text => loc('Modify global group rights'),
- path => 'Admin/Global/CustomFields/Queue-Transactions.html',
- },
-
-};
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
- foreach my $tab (sort keys %{$tabs}) {
- if ($tabs->{$tab}->{'path'} eq $current_tab) {
- $tabs->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{$tab}->{"current_subtab"} = $current_subtab;
- }
- }
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$current_tab => undef
-$subtabs => undef
-$current_subtab => undef
-$Title => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/GroupTabs b/rt/html/Admin/Elements/GroupTabs
index 60edda40e..de39ec117 100644
--- a/rt/html/Admin/Elements/GroupTabs
+++ b/rt/html/Admin/Elements/GroupTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs,
subtabs => $tabs,
current_tab => 'Admin/Groups/',
@@ -67,8 +67,6 @@ $tabs->{"this"} = { class => "currentnav",
path => "Admin/Groups/GroupRights.html?id=" . $GroupObj->id, },
G => { title => loc('User Rights'),
path => "Admin/Groups/UserRights.html?id=" . $GroupObj->id, },
- H => { title => loc('History'),
- path => "Admin/Groups/History.html?id=" . $GroupObj->id },
}
}
}
@@ -76,7 +74,7 @@ $tabs->{"A"} = { title => loc('Select group'),
path => "Admin/Groups/", };
$tabs->{"B"} = { title => loc('New group'),
path => "Admin/Groups/Modify.html?Create=1",
- separator => 1, };
+ separator => 1, };
# Now let callbacks add their extra tabs
$m->comp( '/Elements/Callback', tabs => $tabs, %ARGS );
diff --git a/rt/html/Admin/Elements/Header b/rt/html/Admin/Elements/Header
index b80908094..69a3ccd53 100644
--- a/rt/html/Admin/Elements/Header
+++ b/rt/html/Admin/Elements/Header
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, %ARGS &>
+%# }}} END BPS TAGGED BLOCK
+<& /Elements/Header, Title => $Title &>
<%ARGS>
$Title => undef
diff --git a/rt/html/Admin/Elements/ListGlobalCustomFields b/rt/html/Admin/Elements/ListGlobalCustomFields
index 3df9d6292..abca29073 100644
--- a/rt/html/Admin/Elements/ListGlobalCustomFields
+++ b/rt/html/Admin/Elements/ListGlobalCustomFields
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% my $count = 0;
% while (my $CustomFieldObj = $CustomFields->Next) {
% $count++;
diff --git a/rt/html/Admin/Elements/ListGlobalScrips b/rt/html/Admin/Elements/ListGlobalScrips
index 2e3791257..cb3f89a9f 100644
--- a/rt/html/Admin/Elements/ListGlobalScrips
+++ b/rt/html/Admin/Elements/ListGlobalScrips
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,32 +42,16 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-
-% if ($Scrips->Count == 0) {
-
-<P><i><&|/l&>(No scrips)</&></i></P>
-
-% } else {
-
-<UL>
-
+%# }}} END BPS TAGGED BLOCK
+% my $count = 0;
% while (my $scrip = $Scrips->Next ) {
-<LI>
-<a href="<%$RT::WebPath%>/Admin/Global/Scrip.html?id=<%$scrip->Id%>&Queue=<%0%>">
-% if ($scrip->Description) {
-<% $scrip->Description %>
-% } else {
-<i>(<&|/l, $scrip->Id&>Scrip #[_1]</&>)</i>
-% }
-</a><br>
-<small><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></small>
-</LI>
+% $count++;
+<font size="-1"><&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name) &>[_1] [_2] with template [_3]</&></font>
+<BR>
+% }
+% if (!$count) {
+<font size="-1"><&|/l&>(No scrips)</&></font>
% }
-
-</UL>
-
-% }
<%init>
my $Scrips = new RT::Scrips ($session{'CurrentUser'});
diff --git a/rt/html/Admin/Elements/ModifyTemplate b/rt/html/Admin/Elements/ModifyTemplate
index 6749f3e65..acd87a73f 100644
--- a/rt/html/Admin/Elements/ModifyTemplate
+++ b/rt/html/Admin/Elements/ModifyTemplate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<TABLE>
<TR>
<TD ALIGN=RIGHT>
diff --git a/rt/html/Admin/Elements/ObjectCustomFields b/rt/html/Admin/Elements/ObjectCustomFields
deleted file mode 100644
index a87e1579d..000000000
--- a/rt/html/Admin/Elements/ObjectCustomFields
+++ /dev/null
@@ -1,109 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& $ObjectTabs,
-$id ? (
- id => $Object->id,
- current_tab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id,
- current_subtab => "Admin/$Types/CustomFields.html?$sub_type_url&id=".$id,
- "${Type}Obj" => $Object,
-) : (
- current_tab => "Admin/Global/CustomFields/${QualifiedType}s.html",
-),
- Title => $title
- &>
-
-<& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
-<%INIT>
-# XXX TODO: Validate here?
-#$ObjectType =~ /^RT::(Queue|User|Group)$/
-# or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType));
-
-
-
-my $Type = $1;
-my $Types = $Type.'s';
-my $ObjectTabs;
-my $Object = $ObjectType->new($session{'CurrentUser'});
-
-
-my $QualifiedType;
-my $FriendlySubTypes;
-if ($SubType =~/^RT::(.*)$/) {
- $FriendlySubTypes = RT::CustomField->new($session{'CurrentUser'})->FriendlyLookupType($Object->CustomFieldLookupType);
- $QualifiedType = "$Type-$1";
-} else {
- $QualifiedType = $Type;
-}
-
-if ($id) {
- $Object->Load($id) || Abort(loc("Couldn't load object [_1]", $id));
- $ObjectTabs = "/Admin/Elements/${Type}Tabs";
-} else {
- $ObjectTabs = "/Admin/Elements/GlobalCustomFieldTabs";
-
-}
-
-my $title;
-if ($id) {
-$title = loc('Edit Custom Fields for [_1]', $Object->Name);
-}
-elsif ($SubType) {
-
- $title= loc("Modify Custom Fields which apply to [_1] for all [_2]", loc(lc($FriendlySubTypes)), loc(lc($Types)));
-} else {
- $title =loc("Modify Custom Fields which apply to all [_1]", loc(lc($Types)));
-
-}
-my $sub_type_url;
-$sub_type_url = "SubType=$SubType" if $SubType;
-
-</%INIT>
-<%ARGS>
-$id => undef
-$ObjectType
-$SubType => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/PickCustomFields b/rt/html/Admin/Elements/PickCustomFields
deleted file mode 100644
index c2a30f9a3..000000000
--- a/rt/html/Admin/Elements/PickCustomFields
+++ /dev/null
@@ -1,96 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% if (@CustomFields == 0) {
-<p><i><&|/l&>(None)</&></i></p>
-% } else {
-<TABLE cellspacing=0 cellpadding=2>
-% my $count;
-% foreach my $CustomFieldObj (@CustomFields) {
-<TR>
-% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'CHECKED' : '' %>
->
- </TD>
-% }
- <TD valign="TOP">
- <A HREF="<%$RT::WebPath%>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
-% if ($CustomFieldObj->Name) {
-<b><%$CustomFieldObj->Name%></b>
-% } else {
-<i>(<&|/l&>no name</&>)</i>
-% }
-</a><br>
- <%$CustomFieldObj->Description%>
- </TD>
- <TD valign="TOP">
- <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
- </TD>
-% # show 'move up' unless it's the first item
-% if ($count++ and $Checked) {
- <TD valign="TOP">
- [<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=-1"><&|/l&>Move up</&></a>]
-% } else {
- <TD valign="TOP" ALIGN=RIGHT>
-% }
-
-% # show 'move down' unless it's the last item
-% if ($count != @CustomFields and $Checked) {
-% $m->print(' | ') if $count > 1;
- [<a href="<%$RT::WebPath%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>]
-% }
- </TD>
-</TR>
-% }
-</TABLE>
-% }
-<%ARGS>
-@CustomFields
-$id
-$ReadOnly => 0
-$Checked => 0
-$SubType
-</%ARGS>
diff --git a/rt/html/Admin/Elements/PickObjects b/rt/html/Admin/Elements/PickObjects
deleted file mode 100644
index b07a88240..000000000
--- a/rt/html/Admin/Elements/PickObjects
+++ /dev/null
@@ -1,80 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-% if (@Objects == 0) {
-<P><i><&|/l&>(None)</&></i></P>
-% } else {
-<TABLE cellspacing=0 cellpadding=2>
-% my $count;
-% foreach my $Object (@Objects) {
-<TR>
-% if (!$ReadOnly) {
- <TD valign="TOP">
-<input type="checkbox" name="Object-<%$Object->id%>-CF-<%$id%>" value="1" <% $Checked ? 'CHECKED' : ''%>
->
- </TD>
-% }
- <TD valign="TOP">
-% if ($Object->Name) {
- <b><%$Object->Name%></b><br>
-% } else {
- <i>(<%loc("no name")%>)</i><br>
-% }
- <%$Object->can('Description') && $Object->Description%>
- </TD>
-%# <TD valign="TOP">
-%# <i><% $CustomFieldObj->FriendlyTypeComposite %></i>
-%# </TD>
- </TD>
-</TR>
-% }
-</TABLE>
-% }
-<%ARGS>
-@Objects
-$id
-$ReadOnly => 0
-$Checked => 0
-</%ARGS>
diff --git a/rt/html/Admin/Elements/QueueRightsForUser b/rt/html/Admin/Elements/QueueRightsForUser
index 01f294a59..57b5fd8b3 100644
--- a/rt/html/Admin/Elements/QueueRightsForUser
+++ b/rt/html/Admin/Elements/QueueRightsForUser
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,11 +42,11 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<UL>
%while(my $ACE = $ACL->Next) {
-<LI><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
+<LI><checkbox name="delete_ace_<%$ACE->id%>"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
%}
</UL>
diff --git a/rt/html/Admin/Elements/QueueTabs b/rt/html/Admin/Elements/QueueTabs
index 93522d0a2..0eec1fc6f 100644
--- a/rt/html/Admin/Elements/QueueTabs
+++ b/rt/html/Admin/Elements/QueueTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs,
subtabs => $tabs,
current_tab => 'Admin/Queues/',
@@ -71,12 +71,8 @@ if ($id) {
path => "Admin/Queues/Templates.html?id=".$id,
},
- G1 => { title => loc('Ticket Custom Fields'),
- path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket&id='.$id,
- },
-
- G2 => { title => loc('Transaction Custom Fields'),
- path => 'Admin/Queues/CustomFields.html?SubType=RT::Ticket-RT::Transaction&id='.$id,
+ G => { title => loc('Custom Fields'),
+ path => 'Admin/Queues/CustomFields.html?id='.$id,
},
H => { title => loc('Group Rights'),
@@ -94,7 +90,8 @@ if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminQue
};
$tabs->{"B"} = { title => loc('New queue'),
path => "Admin/Queues/Modify.html?Create=1",
- separator => 1, };
+ separator => 1,
+ };
}
# Now let callbacks add their extra tabs
diff --git a/rt/html/Admin/Elements/SelectCustomFieldLookupType b/rt/html/Admin/Elements/SelectCustomFieldLookupType
deleted file mode 100644
index ec9f740b9..000000000
--- a/rt/html/Admin/Elements/SelectCustomFieldLookupType
+++ /dev/null
@@ -1,58 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<SELECT NAME ="<%$Name%>">
-%for my $option ($cf->LookupTypes) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyLookupType($option) %></OPTION>
-%}
-</SELECT>
-<%INIT>
-my $cf = RT::CustomField->new($session{'CurrentUser'});
-
-</%INIT>
-<%ARGS>
-$Default=>undef
-$Name => 'LookupType'
-</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectCustomFieldType b/rt/html/Admin/Elements/SelectCustomFieldType
index 3f25b8e71..76606c412 100644
--- a/rt/html/Admin/Elements/SelectCustomFieldType
+++ b/rt/html/Admin/Elements/SelectCustomFieldType
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,10 +42,10 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME ="<%$Name%>">
-%for my $option ($cf->TypeComposites) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyTypeComposite($option) %></OPTION>
+%for my $option ($cf->Types) {
+<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><% $cf->FriendlyType($option) %></OPTION>
%}
</SELECT>
<%INIT>
@@ -54,5 +54,5 @@ my $cf = RT::CustomField->new($session{'CurrentUser'});
</%INIT>
<%ARGS>
$Default=>undef
-$Name => 'TypeComposite'
+$Name => 'Type'
</%ARGS>
diff --git a/rt/html/Admin/Elements/SelectGroups b/rt/html/Admin/Elements/SelectGroups
index 92bd47587..175ce0657 100644
--- a/rt/html/Admin/Elements/SelectGroups
+++ b/rt/html/Admin/Elements/SelectGroups
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
%while (my $group = $groups->Next) {
<OPTION VALUE="<%$group->id%>"><%$group->Name%>
diff --git a/rt/html/Admin/Elements/SelectModifyGroup b/rt/html/Admin/Elements/SelectModifyGroup
index 272e1f0c7..b33eaea44 100644
--- a/rt/html/Admin/Elements/SelectModifyGroup
+++ b/rt/html/Admin/Elements/SelectModifyGroup
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $Group = $Groups->Next) {
<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectModifyQueue b/rt/html/Admin/Elements/SelectModifyQueue
index 3a30d09c8..2ca6bd814 100644
--- a/rt/html/Admin/Elements/SelectModifyQueue
+++ b/rt/html/Admin/Elements/SelectModifyQueue
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $queue = $queues->Next) {
<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectModifyUser b/rt/html/Admin/Elements/SelectModifyUser
index fc6c01205..97411c909 100644
--- a/rt/html/Admin/Elements/SelectModifyUser
+++ b/rt/html/Admin/Elements/SelectModifyUser
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
%while ( $user = $users->Next) {
<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR>
%}
diff --git a/rt/html/Admin/Elements/SelectNewGroupMembers b/rt/html/Admin/Elements/SelectNewGroupMembers
index 95056aec9..90f9a0b91 100644
--- a/rt/html/Admin/Elements/SelectNewGroupMembers
+++ b/rt/html/Admin/Elements/SelectNewGroupMembers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% if ($Show ne 'Groups') {
<b><&|/l&>Users</&></b>
<SELECT MULTIPLE NAME="<%$Name%>Users" SIZE=10>
diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights
index 3e61d5071..61a9e42ec 100644
--- a/rt/html/Admin/Elements/SelectRights
+++ b/rt/html/Admin/Elements/SelectRights
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,30 +42,27 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
<TABLE BORDER=0>
<TR>
<TD valign=top width="180" align="left">
-% my %current_rights;
<h3><&|/l&>Current rights</&></h3>
-% if ($ACLObj->Count() == 0) {
-<i><&|/l&>No rights granted.</&></i> <BR>
-% } else {
+% if ($ACLObj->Count() > 0) {
<i>(<&|/l&>Check box to revoke right</&>)</i> <BR>
+% } else {
+<i><&|/l&>No rights granted.</&></i> <BR>
+% }
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
-% $current_rights{$right->RightName} = 1;
<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br>
% }
% }
-% }
</TD>
<TD valign=top>
<h3><&|/l&>New rights</&></h3>
<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>">
% foreach $right (sort keys %Rights) {
-% next if $current_rights{$right};
<OPTION VALUE="<%$right%>"
><% loc($right) %></OPTION>
% }
@@ -103,7 +100,7 @@
}
else {
- %Rights = ( loc('System Error') => loc("No rights found") );
+ %Rights = { loc('System Error') => loc("No rights found")};
}
$ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id;
diff --git a/rt/html/Admin/Elements/SelectScrip b/rt/html/Admin/Elements/SelectScrip
index a9e979699..7fce6d54e 100644
--- a/rt/html/Admin/Elements/SelectScrip
+++ b/rt/html/Admin/Elements/SelectScrip
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
<% $Default eq undef && 'SELECTED' %>
diff --git a/rt/html/Admin/Elements/SelectScripAction b/rt/html/Admin/Elements/SelectScripAction
index 8d88d6458..17cd6a199 100644
--- a/rt/html/Admin/Elements/SelectScripAction
+++ b/rt/html/Admin/Elements/SelectScripAction
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
-<% ! defined $Default && 'SELECTED' %>
+<% $Default eq undef && 'SELECTED' %>
>-</OPTION>
%while (my $ScripAction = $ScripActions->Next) {
<OPTION VALUE=<%$ScripAction->Id%>
-<% defined $Default && $ScripAction->Id == $Default && 'SELECTED' %>
+<% $ScripAction->Id == $Default && 'SELECTED' %>
><% loc($ScripAction->Name) %>
</OPTION>
%}
diff --git a/rt/html/Admin/Elements/SelectScripCondition b/rt/html/Admin/Elements/SelectScripCondition
index faa99fda6..021132be7 100644
--- a/rt/html/Admin/Elements/SelectScripCondition
+++ b/rt/html/Admin/Elements/SelectScripCondition
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,14 +42,14 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
-<% ! defined $Default && 'SELECTED' %>
+<% $Default eq undef && 'SELECTED' %>
>-</OPTION>
%while (my $ScripCondition = $ScripConditions->Next) {
<OPTION VALUE=<%$ScripCondition->Id%>
-<% defined $Default && $ScripCondition->Id == $Default && 'SELECTED' %>
+<% $ScripCondition->Id == $Default && 'SELECTED' %>
><% loc($ScripCondition->Name) %>
</OPTION>
%}
diff --git a/rt/html/Admin/Elements/SelectSingleOrMultiple b/rt/html/Admin/Elements/SelectSingleOrMultiple
index 571695091..9b1982606 100644
--- a/rt/html/Admin/Elements/SelectSingleOrMultiple
+++ b/rt/html/Admin/Elements/SelectSingleOrMultiple
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<select name="<%$Name%>">
<option value="1" <%$SingleDefault%>><&|/l&>Single</&></option>
<option value="0" <%$MultipleDefault%>><&|/l&>Multiple</&></option>
diff --git a/rt/html/Admin/Elements/SelectStage b/rt/html/Admin/Elements/SelectStage
index 0fbf5c609..0472d2fcd 100644
--- a/rt/html/Admin/Elements/SelectStage
+++ b/rt/html/Admin/Elements/SelectStage
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,9 +42,9 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
-% foreach my $stage (@stages) {
+% foreach my $stage (qw(TransactionCreate TransactionBatch Disabled)) {
<OPTION VALUE=<%$stage%>
<% ($stage eq $Default) && 'SELECTED' %>
><% loc($stage) %>
@@ -54,9 +54,6 @@
if ($Default eq '') {
$Default = 'TransactionCreate';
}
-my @stages = 'TransactionCreate';
-push @stages, 'TransactionBatch' if $RT::UseTransactionBatch;
-push @stages, 'Disabled';
</%INIT>
<%ARGS>
$Default => 'TransactionCreate'
diff --git a/rt/html/Admin/Elements/SelectTemplate b/rt/html/Admin/Elements/SelectTemplate
index 7d83b6768..f48948387 100644
--- a/rt/html/Admin/Elements/SelectTemplate
+++ b/rt/html/Admin/Elements/SelectTemplate
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT NAME=<%$Name%>>
<OPTION VALUE=""
<% $Default eq 'none' && 'SELECTED' %>
diff --git a/rt/html/Admin/Elements/SelectUsers b/rt/html/Admin/Elements/SelectUsers
index a88aa8ff7..31ac3e453 100644
--- a/rt/html/Admin/Elements/SelectUsers
+++ b/rt/html/Admin/Elements/SelectUsers
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
%while (my $user = $users->Next) {
<OPTION VALUE="<%$user->id%>"><%$user->Name%>
diff --git a/rt/html/Admin/Elements/SystemTabs b/rt/html/Admin/Elements/SystemTabs
index 646f552f5..4409695d8 100644
--- a/rt/html/Admin/Elements/SystemTabs
+++ b/rt/html/Admin/Elements/SystemTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs, subtabs => $tabs,
current_tab => 'Admin/Global/',
current_subtab => $current_tab,
@@ -59,7 +59,7 @@
},
F => { title => loc('Custom Fields'),
- path => 'Admin/Global/CustomFields/index.html',
+ path => 'Admin/Global/CustomFields.html',
},
G => { title => loc('Group Rights'),
diff --git a/rt/html/Admin/Elements/Tabs b/rt/html/Admin/Elements/Tabs
index f90a629a2..39eaa728b 100644
--- a/rt/html/Admin/Elements/Tabs
+++ b/rt/html/Admin/Elements/Tabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Tabs,
tabs => $tabs,
current_toptab => 'Admin/',
@@ -59,13 +59,10 @@
C => { title => loc('Queues'),
path => 'Admin/Queues/',
},
- D => { 'title' => loc('Custom Fields'),
- path => 'Admin/CustomFields/',
- },
- E => { 'title' => loc('Global'),
+ D => { 'title' => loc('Global'),
path => 'Admin/Global/',
},
- F => { 'title' => loc('Tools'),
+ E => { 'title' => loc('Tools'),
path => 'Admin/Tools/',
},
};
diff --git a/rt/html/Admin/Elements/ToolTabs b/rt/html/Admin/Elements/ToolTabs
index 773b81099..606bd1202 100755
--- a/rt/html/Admin/Elements/ToolTabs
+++ b/rt/html/Admin/Elements/ToolTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Tabs, subtabs => $tabs,
current_tab => 'Admin/Tools/',
current_subtab => $current_tab,
diff --git a/rt/html/Admin/Elements/UserTabs b/rt/html/Admin/Elements/UserTabs
index 0ffd29b0f..671bd6dd4 100644
--- a/rt/html/Admin/Elements/UserTabs
+++ b/rt/html/Admin/Elements/UserTabs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,61 +42,52 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Tabs,
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Tabs,
subtabs => $tabs,
- current_tab => 'Admin/Users/',
- current_subtab => $current_tab,
+ current_tab => 'Admin/Users/',
+ current_subtab => $current_tab,
Title => $Title &>
<%INIT>
my $tabs;
if ($id) {
-$tabs->{'this'} = { title => eval { $UserObj->Name },
-
+ $tabs->{'this'} = {
+ title => eval { $UserObj->Name },
path => "Admin/Users/Modify.html?id=".$id,
-subtabs => {
- Basics => { title => loc('Basics'),
+ current_subtab => $current_tab,
+ subtabs => {
+ A => { title => loc('Basics'),
path => "Admin/Users/Modify.html?id=".$id
},
- Memberships => { title => loc('Memberships'),
- path => "Admin/Users/Memberships.html?id=".$id
- },
- History => { title => loc('History'),
- path => "Admin/Users/History.html?id=".$id
- },
-# Scrips => { title => loc('Rights'),
-# path => "Admin/Users/Rights.html?id=".$id
-# }
-
+ }
}
}
-}
-if ($session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers')) {
- $tabs->{"A"} = { title => loc('Select user'),
- path => "Admin/Users/",
- };
- $tabs->{"B"} = { title => loc('New user'),
- path => "Admin/Users/Modify.html?Create=1",
+
+if ( $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'AdminUsers') ) {
+ $tabs->{"A"} = {
+ title => loc('Select user'),
+ path => "Admin/Users/",
+ };
+ $tabs->{"B"} = {
+ title => loc('New user'),
+ path => "Admin/Users/Modify.html?Create=1",
separator => 1,
};
}
- # Now let callbacks add their extra tabs
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-#foreach my $tab ( sort keys %{$tabs} ) {
-# if ( $tabs->{$tab}->{'path'} eq $current_subtab ) {
-# $tabs->{$tab}->{"current_subtab"} = $current_subtab;
-# }
-#}
-foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
- if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
- $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab;
- }
-}
-$tabs->{'this'}->{"current_subtab"} = $current_tab;
+# Now let callbacks add their extra tabs
+$m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+foreach my $tab ( sort keys %{$tabs->{'this'}->{'subtabs'}} ) {
+ if ( $tabs->{'this'}->{'subtabs'}->{$tab}->{'path'} eq $current_tab ) {
+ $tabs->{'this'}->{"current_subtab"} = $current_tab;
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{"current_subtab"} = $current_subtab;
+ $tabs->{'this'}->{'subtabs'}->{$tab}->{"subtabs"} = $subtabs;
+ }
+}
+
$current_tab = "Admin/Users/Modify.html?id=".$id if $id;
+
</%INIT>
<%ARGS>
$UserObj => undef
diff --git a/rt/html/Admin/Users/CustomFields.html b/rt/html/Admin/Global/CustomField.html
index 5662c6c16..3871d8998 100644
--- a/rt/html/Admin/Users/CustomFields.html
+++ b/rt/html/Admin/Global/CustomField.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,28 +42,45 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/UserTabs,
- id => $Object->id,
- current_tab => "Admin/Users/CustomFields.html?$id=".$id,
- current_subtab => "Admin/Users/CustomFields.html?id=".$id,
- UserObj => $Object,
- Title => $title
- &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/CustomFields.html',
+ current_subtab => $current_subtab,
+ subtabs => $subtabs,
+ Title => $title &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::User' &>
-<%INIT>
-my $Object = RT::User->new( $session{'CurrentUser'} );
-
-$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
-my $FriendlySubTypes =
- RT::CustomField->new( $session{'CurrentUser'} )
- ->FriendlyLookupType( $Object->CustomFieldLookupType );
+<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
-my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
+<%INIT>
+my ($title, $current_subtab);
+my $subtabs = {
+ A => { title => loc('Select custom field'),
+ path => "Admin/Global/CustomFields.html"
+ },
+ B => { title => loc('New custom field'),
+ path => "Admin/Global/CustomField.html?create=1&Queue=0",
+ separator => 1,
+ }
+ };
+if ( $ARGS{'create'} ) {
+ $current_subtab = "Admin/Global/CustomField.html?create=1&Queue=0";
+ $title = loc('Create a CustomField which applies to all queues');
+}
+else {
+ $current_subtab =
+ "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0";
+ $title = loc('Modify a CustomField which applies to all queues');
+ $subtabs->{"C"} = {
+ title => loc( 'Custom Field #[_1]', $CustomField ),
+ path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"
+ };
+}
</%INIT>
<%ARGS>
-$id => undef
+$CustomField => undef
</%ARGS>
+<%ATTR>
+AutoFlush => 0
+</%ATTR>
diff --git a/rt/html/Admin/Groups/History.html b/rt/html/Admin/Global/CustomFields.html
index 40dab46e9..593040218 100644
--- a/rt/html/Admin/Groups/History.html
+++ b/rt/html/Admin/Global/CustomFields.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,24 +42,27 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GroupTabs,
- id => $id,
- GroupObj => $GroupObj,
- current_subtab => $current_tab,
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Header, Title => $title &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/CustomFields.html',
+ current_subtab => 'Admin/Global/CustomFields.html',
+ subtabs => $subtabs,
Title => $title &>
-<& /Ticket/Elements/ShowHistory,
- Ticket => $GroupObj,
- ShowHeaderModes => 0,
-&>
+<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
<%INIT>
-my $current_tab = 'Admin/Groups/History.html?id='.$id;
-my $GroupObj = new RT::Group($session{'CurrentUser'});
-$GroupObj->Load($id) || Abort("Couldn't load group '$id'");
-my $title = loc("History of the group [_1]", $GroupObj->Name);
+my $subtabs = {
+ A => { title => loc('Select custom field'),
+ path => "Admin/Global/CustomFields.html"
+ },
+ B => { title => loc('New custom field'),
+ path => "Admin/Global/CustomField.html?create=1&Queue=0",
+ separator => 1,
+ }
+ };
+my $title = loc("Modify Custom Fields which apply to all queues");
</%INIT>
<%ARGS>
$id => undef
diff --git a/rt/html/Admin/Global/CustomFields/Groups.html b/rt/html/Admin/Global/CustomFields/Groups.html
deleted file mode 100644
index bffde016f..000000000
--- a/rt/html/Admin/Global/CustomFields/Groups.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Groups.html",
- current_subtab => "Admin/Global/CustomFields/Groups.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Group', Object=> $object &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for all groups');
- my $object = RT::Group->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html b/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
deleted file mode 100755
index 396559a17..000000000
--- a/rt/html/Admin/Global/CustomFields/Queue-Tickets.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Queue-Tickets.html",
- current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket' &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for tickets in all queues');
- my $object = RT::Queue->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html b/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
deleted file mode 100755
index 63b4cfe6b..000000000
--- a/rt/html/Admin/Global/CustomFields/Queue-Transactions.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Queue-Transactions.html",
- current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object, SubType => 'RT::Ticket-RT::Transaction' &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for tickets in all queues');
- my $object = RT::Queue->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/Users.html b/rt/html/Admin/Global/CustomFields/Users.html
deleted file mode 100644
index 6b79743d2..000000000
--- a/rt/html/Admin/Global/CustomFields/Users.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs,
- current_tab => "Admin/Global/CustomFields/Users.html",
- current_subtab => "Admin/Global/CustomFields/Users.html",
- Title => $title
- &>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::User', Object=> $object &>
-<%INIT>
- my $title = loc( 'Edit Custom Fields for all users');
- my $object = RT::User->new($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/html/Admin/Global/CustomFields/index.html b/rt/html/Admin/Global/CustomFields/index.html
deleted file mode 100644
index 9cdcfd549..000000000
--- a/rt/html/Admin/Global/CustomFields/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<& /Elements/Callback, tabs => $tabs, %ARGS &>
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/GlobalCustomFieldTabs, Title => $title &>
-
-<ul>
-% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<% $tabs->{$key}{path} %>"><% $tabs->{$key}{title} %></a></font><br>
-<% $tabs->{$key}{text} %>
-</li>
-% }
-</ul>
-
-<%INIT>
-my $title = loc("Global custom field configuration");
-
-my $tabs = {
-
- A => {
- title => loc('Users'),
- text => loc('Select custom fields for all users'),
- path => 'Users.html',
- },
- B => {
- title => loc('Groups'),
- text => loc('Select custom fields for all user groups'),
- path => 'Groups.html',
- },
-
- F => {
- title => loc('Tickets'),
- text => loc('Select custom fields for tickets in all queues'),
- path => 'Queue-Tickets.html',
- },
-
- G => {
- title => loc('Ticket Transactions'),
- text =>
- loc('Select custom fields for transactions on tickets in all queues'),
- path => 'Queue-Transactions.html',
- },
-
-};
-
-
-$m->comp('/Elements/Callback', tabs => $tabs);
-</%INIT>
diff --git a/rt/html/Admin/Global/GroupRights.html b/rt/html/Admin/Global/GroupRights.html
index 8d71432e0..68718b9af 100644
--- a/rt/html/Admin/Global/GroupRights.html
+++ b/rt/html/Admin/Global/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/GroupRights.html',
diff --git a/rt/html/Admin/Global/Scrip.html b/rt/html/Admin/Global/Scrip.html
index 4e0c1f466..2e63fe7e2 100644
--- a/rt/html/Admin/Global/Scrip.html
+++ b/rt/html/Admin/Global/Scrip.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
diff --git a/rt/html/Admin/Global/Scrips.html b/rt/html/Admin/Global/Scrips.html
index dcfa6ff07..37bd2c722 100644
--- a/rt/html/Admin/Global/Scrips.html
+++ b/rt/html/Admin/Global/Scrips.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Scrips.html',
diff --git a/rt/html/Admin/Global/Template.html b/rt/html/Admin/Global/Template.html
index 17da59b9e..a289eb644 100644
--- a/rt/html/Admin/Global/Template.html
+++ b/rt/html/Admin/Global/Template.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc("Modify template [_1]", $TemplateObj->id) &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Templates.html',
diff --git a/rt/html/Admin/Global/Templates.html b/rt/html/Admin/Global/Templates.html
index 387326cd1..da3395ab4 100644
--- a/rt/html/Admin/Global/Templates.html
+++ b/rt/html/Admin/Global/Templates.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,8 +42,8 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/Header, Title => $title, FeedURI => 'templates' &>
+%# }}} END BPS TAGGED BLOCK
+<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/Templates.html',
current_subtab => 'Admin/Global/Templates.html',
diff --git a/rt/html/Admin/Global/UserRights.html b/rt/html/Admin/Global/UserRights.html
index 14a4de368..a65e7c216 100644
--- a/rt/html/Admin/Global/UserRights.html
+++ b/rt/html/Admin/Global/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify global user rights') &>
<& /Admin/Elements/SystemTabs,
current_tab => 'Admin/Global/UserRights.html',
diff --git a/rt/html/Admin/Global/index.html b/rt/html/Admin/Global/index.html
index af7a9ddd9..3a70e7c17 100644
--- a/rt/html/Admin/Global/index.html
+++ b/rt/html/Admin/Global/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Callback, tabs => $tabs, %ARGS &>
<& /Admin/Elements/Header, Title => loc('Admin/Global configuration') &>
<& /Admin/Elements/SystemTabs,
@@ -69,8 +69,8 @@
},
F => { title => loc('Custom Fields'),
- text => loc('Modify global custom fields'),
- path => 'CustomFields/index.html',
+ text => loc('Modify Custom Fields which apply to all queues'),
+ path => 'CustomFields.html',
},
G => { title => loc('Group Rights'),
diff --git a/rt/html/Admin/Groups/CustomFields.html b/rt/html/Admin/Groups/CustomFields.html
deleted file mode 100644
index c2336b042..000000000
--- a/rt/html/Admin/Groups/CustomFields.html
+++ /dev/null
@@ -1,46 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/ObjectCustomFields, %ARGS, ObjectType => 'RT::Group' &>
diff --git a/rt/html/Admin/Groups/GroupRights.html b/rt/html/Admin/Groups/GroupRights.html
index d95bdae07..55e2a6530 100644
--- a/rt/html/Admin/Groups/GroupRights.html
+++ b/rt/html/Admin/Groups/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/Members.html b/rt/html/Admin/Groups/Members.html
index fd25b2d7f..779df9567 100644
--- a/rt/html/Admin/Groups/Members.html
+++ b/rt/html/Admin/Groups/Members.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => "RT/Admin/Edit the group ". $Group->Name &>
<& /Admin/Elements/GroupTabs, GroupObj => $Group,
current_tab => 'Admin/Groups/Members.html?id='.$id,
@@ -78,7 +78,7 @@
% $UserMembers->LimitToUsers();
<UL>
% while (my $member = $UserMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%> (<%$member->MemberObj->Object->RealName%>)
% }
</ul>
@@ -87,7 +87,7 @@
% my $GroupMembers = $Group->MembersObj;
% $GroupMembers->LimitToGroups();
% while (my $member = $GroupMembers->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>" value="1">
+<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->MemberId%>">
<%$member->MemberObj->Object->Name%>
% }
% }
diff --git a/rt/html/Admin/Groups/Modify.html b/rt/html/Admin/Groups/Modify.html
index 94c0203b1..0140a57e1 100644
--- a/rt/html/Admin/Groups/Modify.html
+++ b/rt/html/Admin/Groups/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs,
@@ -53,7 +53,7 @@
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST>
%unless ($Group->Id) {
<INPUT TYPE=HIDDEN NAME=id VALUE="new">
@@ -65,27 +65,16 @@
<&|/l&>Name</&>:
</TD>
<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR>
-<TR>
+</TR><TR>
<TD ALIGN=RIGHT>
<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD>
-</TR>
-% my $CFs = $Group->CustomFields;
-% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
-<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, CustomField => $CF, Object => $Group &>
-</TD></TR>
-% }
-<TR>
+</TR><TR>
<TD COLSPAN=2>
<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> <&|/l&>Enabled (Unchecking this box disables this group)</&><BR>
</TR>
-<& /Elements/Callback, GroupObj => $Group, results => \@results, %ARGS &>
</TABLE>
-<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &>
+<& /Elements/Submit, Label => loc('Create'), Reset => 1 &>
</form>
<%INIT>
@@ -135,7 +124,6 @@ if ($id) {
Object => $Group,
ARGSRef => \%ARGS );
push (@results,@fieldresults);
- push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group );
}
#we're asking about enabled on the web page but really care about disabled.
diff --git a/rt/html/Admin/Groups/UserRights.html b/rt/html/Admin/Groups/UserRights.html
index 5237b1578..3f17baa41 100644
--- a/rt/html/Admin/Groups/UserRights.html
+++ b/rt/html/Admin/Groups/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
<& /Admin/Elements/GroupTabs,
GroupObj => $GroupObj,
diff --git a/rt/html/Admin/Groups/index.html b/rt/html/Admin/Groups/index.html
index 073440696..7c2cd504c 100644
--- a/rt/html/Admin/Groups/index.html
+++ b/rt/html/Admin/Groups/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,66 +42,36 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/',
current_subtab => 'Admin/Groups/',
Title => $title &>
-<%$caption%>:<BR> <UL>
-%if ($Groups->Count == 0) {
-<LI> <i><&|/l&>No groups matching search criteria found.</&></i>
-% }
-%my @ids;
+
+
+<UL>
%while ( my $Group = $Groups->Next) {
-% push @ids, $Group->Id;
<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name || loc('(empty)')%></a><BR>
%}
</UL>
-%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/Group/<% $ids %>/Groups.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
-%}
<br><br>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<input type="checkbox" name="FindDisabledGroups" value="1"> <&|/l&>Include disabled groups in listing.</&>
+<input type="checkbox" name="FindDisabledGroups"> <&|/l&>Include disabled groups in listing.</&>
<BR>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
-<br><br>
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Groups/index.html">
-<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><BR>
-<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
-</FORM>
<%INIT>
my $Groups = RT::Groups->new($session{'CurrentUser'});
+
+if ($FindDisabledGroups) {
+ $Groups->{'find_disabled_rows'} = 1;
+}
+
$Groups->LimitToUserDefinedGroups();
my $title = loc('Select a group');
-my $caption;
-if (length $GroupString) {
- $caption = loc("Groups matching search criteria");
- if ($GroupField =~ /^CustomField-(\d+)/) {
- $Groups->LimitCustomField(
- CUSTOMFIELD => $1,
- OPERATOR => $GroupOp,
- VALUE => $GroupString,
- );
- }
- else {
- $Groups->Limit(
- FIELD => $GroupField,
- OPERATOR => $GroupOp,
- VALUE => $GroupString,
- );
- }
-}
-else {
- $caption = loc("User-defined groups");
-}
</%INIT>
<%ARGS>
-$GroupString => undef
-$GroupOp => '='
-$GroupField => 'Name'
$FindDisabledGroups => 0
</%ARGS>
diff --git a/rt/html/Admin/Queues/CustomField.html b/rt/html/Admin/Queues/CustomField.html
index 5beba58c8..a865dba71 100644
--- a/rt/html/Admin/Queues/CustomField.html
+++ b/rt/html/Admin/Queues/CustomField.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
QueueObj => $QueueObj,
@@ -78,7 +78,7 @@ my $subtabs = {
</%INIT>
<%ARGS>
$CustomField => undef
-$Queue => 0
+$Queue => undef
</%ARGS>
<%ATTR>
AutoFlush => 0
diff --git a/rt/html/Admin/Queues/CustomFields.html b/rt/html/Admin/Queues/CustomFields.html
index 4d7e08875..507c02d79 100644
--- a/rt/html/Admin/Queues/CustomFields.html
+++ b/rt/html/Admin/Queues/CustomFields.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,29 +42,30 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/QueueTabs,
- id => $Object->id,
- current_tab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id",
- current_subtab => "Admin/Queues/CustomFields.html?SubType=$SubType&id=$id",
- QueueObj => $Object,
+<& /Admin/Elements/QueueTabs, id => $Queue->id,
+ current_tab => 'Admin/Queues/CustomFields.html?id='.$id,
+ QueueObj => $Queue,
+ subtabs => $subtabs,
Title => $title
&>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Queue' &>
+<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
<%INIT>
-my $Object = RT::Queue->new( $session{'CurrentUser'} );
+my $Queue = new RT::Queue($session{'CurrentUser'});
+$Queue->Load($id) || Abort(loc("Couldn't load queue", $id));
-$Object->Load($id) || Abort( loc( "Couldn't load object [_1]", $id ) );
-my $FriendlySubTypes =
- RT::CustomField->new( $session{'CurrentUser'} )
- ->FriendlyLookupType( $Object->CustomFieldLookupType );
-
-my $title = loc( 'Edit Custom Fields for [_1]', $Object->Name );
+my $CustomFields = RT::CustomFields->new($RT::SystemUser);
+$CustomFields->LimitToQueue($Queue->Id);
+my $subtabs = {
+ A => { title => loc('New custom field'),
+ path => "Admin/Queues/CustomField.html?create=1&Queue=".$id,
+ }
+ };
+my $title= loc('Edit Custom Fields for [_1]', $Queue->Name);
</%INIT>
<%ARGS>
$id => undef
-$SubType => 'RT::Queue-RT::Ticket'
</%ARGS>
diff --git a/rt/html/Admin/Queues/GroupRights.html b/rt/html/Admin/Queues/GroupRights.html
index c5a12bfa3..5e0d5b919 100644
--- a/rt/html/Admin/Queues/GroupRights.html
+++ b/rt/html/Admin/Queues/GroupRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Modify.html b/rt/html/Admin/Queues/Modify.html
index 5517a80c0..717a83af4 100644
--- a/rt/html/Admin/Queues/Modify.html
+++ b/rt/html/Admin/Queues/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
QueueObj => $QueueObj,
@@ -72,13 +72,13 @@
<&|/l&>Reply Address</&>:
</TD><TD>
<INPUT name="CorrespondAddress" value="<% ($Create) ? "" : $QueueObj->CorrespondAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1])</&></i></font>
+<BR><font size="-1"><i><&|/l , $RT::CorrespondAddress&>(If left blank, will default to [_1]</&></i></font>
</TD>
<TD ALIGN=RIGHT>
<&|/l&>Comment Address</&>: </TD><TD>
<INPUT NAME="CommentAddress" value="<% ($Create) ? "" : $QueueObj->CommentAddress %>">
-<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1])</&></i></font>
+<BR><font size="-1"><i><&|/l , $RT::CommentAddress&>(If left blank, will default to [_1]</&></i></font>
</TD>
</TR><TR>
@@ -159,7 +159,7 @@ my @attribs= qw(Description CorrespondAddress CommentAddress Name
}
if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) {
my ($code, $msg) = $QueueObj->SetDisabled($Disabled);
- push @results, loc('Enabled status: [_1]', loc_fuzzy($msg));
+ push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
}
if ($QueueObj->Disabled()) {
diff --git a/rt/html/Admin/Queues/People.html b/rt/html/Admin/Queues/People.html
index e29b9d34f..1a5caeec4 100644
--- a/rt/html/Admin/Queues/People.html
+++ b/rt/html/Admin/Queues/People.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => loc('Modify people related to queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
@@ -79,7 +79,7 @@
<& /Elements/SelectUsers &>
<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>">
<BR>
-<&|/l&>Find groups whose</&><BR>
+<&|/l&>Find group whose</&><BR>
<& /Elements/SelectGroups &>
<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>">
diff --git a/rt/html/Admin/Queues/Scrip.html b/rt/html/Admin/Queues/Scrip.html
index 1223fbfed..be9226fac 100644
--- a/rt/html/Admin/Queues/Scrip.html
+++ b/rt/html/Admin/Queues/Scrip.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->Id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Scrips.html b/rt/html/Admin/Queues/Scrips.html
index e7092fb22..5d10e442b 100644
--- a/rt/html/Admin/Queues/Scrips.html
+++ b/rt/html/Admin/Queues/Scrips.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Template.html b/rt/html/Admin/Queues/Template.html
index c60a90900..066e7dd25 100644
--- a/rt/html/Admin/Queues/Template.html
+++ b/rt/html/Admin/Queues/Template.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $Queue,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/Templates.html b/rt/html/Admin/Queues/Templates.html
index 888fdbc8a..e92184841 100644
--- a/rt/html/Admin/Queues/Templates.html
+++ b/rt/html/Admin/Queues/Templates.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/QueueTabs, id => $QueueObj->id,
current_tab => 'Admin/Queues/Templates.html?id='.$id,
diff --git a/rt/html/Admin/Queues/UserRights.html b/rt/html/Admin/Queues/UserRights.html
index 399992ae2..6aaaab95a 100644
--- a/rt/html/Admin/Queues/UserRights.html
+++ b/rt/html/Admin/Queues/UserRights.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &>
<& /Admin/Elements/QueueTabs, id => $id,
QueueObj => $QueueObj,
diff --git a/rt/html/Admin/Queues/index.html b/rt/html/Admin/Queues/index.html
index 28adf531c..80998bd56 100644
--- a/rt/html/Admin/Queues/index.html
+++ b/rt/html/Admin/Queues/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc("Admin queues") &>
<& /Admin/Elements/QueueTabs, current_tab => 'Admin/Queues/',
current_subtab => 'Admin/Queues/',
@@ -50,19 +50,18 @@
-<h1><%$caption%></h1>
-<p><&|/l&>Select a queue</&>:</p>
+<%$caption%>:<BR>
<UL>
%if ($queues->Count == 0) {
-<li><i><&|/l&>No queues matching search criteria found.</&></i></li>
+<LI> <i><&|/l&>No queues matching search criteria found.</&></i>
% }
%while ( $queue = $queues->Next) {
-<li><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
+<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
%}
</UL>
<BR>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/index.html">
-<input type="checkbox" name="FindDisabledQueues" value="1"> <&|/l&>Include disabled queues in listing.</&>
+<input type="checkbox" name="FindDisabledQueues"> <&|/l&>Include disabled queues in listing.</&>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
diff --git a/rt/html/Admin/Tools/Configuration.html b/rt/html/Admin/Tools/Configuration.html
index bc5ca69a1..24d9b7309 100644
--- a/rt/html/Admin/Tools/Configuration.html
+++ b/rt/html/Admin/Tools/Configuration.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
require Module::Versions::Report;
my $title = loc('System Configuration');
@@ -80,7 +80,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
% next if (ref ${'RT::'.$key} );
<tr><td>RT::<%$key%></td>
<td>
-% if ($key =~ /Password(?!Length)/i) {
+% if ($key =~ /Password/i) {
<i>Password not printed</i>
% } else {
<%${'RT::'.$key} %>
diff --git a/rt/html/Admin/Tools/index.html b/rt/html/Admin/Tools/index.html
index 49cfac3ee..c9a587371 100644
--- a/rt/html/Admin/Tools/index.html
+++ b/rt/html/Admin/Tools/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<%init>
my $title = loc('System Tools');
</%init>
diff --git a/rt/html/Admin/Users/History.html b/rt/html/Admin/Users/History.html
deleted file mode 100644
index 024a90b00..000000000
--- a/rt/html/Admin/Users/History.html
+++ /dev/null
@@ -1,66 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/UserTabs,
- id => $id,
- UserObj => $UserObj,
- current_tab => $current_tab,
- Title => $title &>
-
-<& /Ticket/Elements/ShowHistory,
- Ticket => $UserObj,
- ShowHeaderModes => 0,
-&>
-
-<%INIT>
-my $current_tab = 'Admin/Users/History.html?id='.$id;
-my $UserObj = new RT::User($session{'CurrentUser'});
-$UserObj->Load($id) || Abort("Couldn't load user '$id'");
-my $title = loc("History of the user [_1]", $UserObj->Name);
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/Memberships.html b/rt/html/Admin/Users/Memberships.html
deleted file mode 100644
index 3e632393f..000000000
--- a/rt/html/Admin/Users/Memberships.html
+++ /dev/null
@@ -1,65 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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/Header, Title => $title &>
-<& /Admin/Elements/UserTabs,
- id => $id,
- UserObj => $UserObj,
- current_tab => $current_tab,
- Title => $title &>
-
-<h2><&|/l&>Groups</&></h2>
-
-<& /Elements/ShowMemberships, UserObj => $UserObj &>
-
-<%INIT>
-my $UserObj = RT::User->new($session{'CurrentUser'});
-$UserObj->Load($id) || Abort("Couldn't load user '$id'");
-my $title = loc("Memberships of the user [_1]", $UserObj->Name);
-my $current_tab = 'Admin/Users/Memberships.html?id='.$id;
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html
index 8a24f9c4a..efa1f80de 100644
--- a/rt/html/Admin/Users/Modify.html
+++ b/rt/html/Admin/Users/Modify.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,7 +42,7 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => $title &>
<& /Admin/Elements/UserTabs,
id => $id,
@@ -52,7 +52,7 @@
<& /Elements/ListActions, actions => \@results &>
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST ENCTYPE="multipart/form-data">
+<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST>
%if ($Create) {
<INPUT TYPE=HIDDEN NAME=id VALUE="new">
% } else {
@@ -91,11 +91,6 @@
<input name="Gecos" value="<%$UserObj->Gecos%>">
</TD></TR>
<TR><TD ALIGN="RIGHT">
-<&|/l&>Language</&>:
-</TD><TD>
-<& /Elements/SelectLang, Name => 'Lang', Default => $UserObj->Lang &>
-</TD></TR>
-<TR><TD ALIGN="RIGHT">
<&|/l&>Extra info</&>:
</TD><TD>
<textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA>
@@ -204,30 +199,17 @@
<TR>
</TR>
</TABLE>
-<BR>
-<& /Elements/TitleBoxStart, title => loc('Custom Fields') &>
-<TABLE>
-% my $CFs = $UserObj->CustomFields;
-% while (my $CF = $CFs->Next) {
-<TR VALIGN="TOP"><TD ALIGN="RIGHT">
-<% $CF->Name %>:
-</TD><TD>
-<& /Elements/EditCustomField, %ARGS, Object => $UserObj, CustomField => $CF &>
-</TD></TR>
-% }
-<TR>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
<TR>
<TD colspan="2">
<& /Elements/TitleBoxStart, title => loc('Comments about this user') &>
-<TEXTAREA class="comments" name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
+<TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%>
+</TEXTAREA>
<& /Elements/TitleBoxEnd &>
%if ($UserObj->Privileged) {
<BR>
<& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA class="signature" COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
+<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
+<%$UserObj->Signature%></TEXTAREA>
<& /Elements/TitleBoxEnd &>
% }
@@ -254,44 +236,46 @@ else {
$current_tab = 'Admin/Users/Modify.html?id='.$id;
if ($id eq 'new') {
- ( $val, $msg ) = $UserObj->Create(
- Name => $Name,
- EmailAddress => $ARGS{'EmailAddress'},
- Name => $ARGS{'Name'},
- Comments => $ARGS{'Comments'},
- Signature => $ARGS{'Signature'},
- EmailAddress => $ARGS{'EmailAddress'},
- FreeformContactInfo => $ARGS{'FreeformContactInfo'},
- Organization => $ARGS{'Organization'},
- RealName => $ARGS{'RealName'},
- NickName => $ARGS{'NickName'},
- Lang => $ARGS{'Lang'},
- EmailEncoding => $ARGS{'EmailEncoding'},
- WebEncoding => $ARGS{'WebEncoding'},
- ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
- ContactInfoSystem => $ARGS{'ContactInfoSystem'},
- Gecos => $ARGS{'Gecos'},
- ExternalAuthId => $ARGS{'ExternalAuthId'},
- AuthSystem => $ARGS{'AuthSystem'},
- HomePhone => $ARGS{'HomePhone'},
- WorkPhone => $ARGS{'WorkPhone'},
- MobilePhone => $ARGS{'MobilePhone'},
- PagerPhone => $ARGS{'PagerPhone'},
- Address1 => $ARGS{'Address1'},
- Address2 => $ARGS{'Address2'},
- City => $ARGS{'City'},
- State => $ARGS{'State'},
- Zip => $ARGS{'Zip'},
- Country => $ARGS{'Country'},
- Privileged => $ARGS{'Privileged'},
- Disabled => ($ARGS{'Enabled'} ? 0 : 1)
- );
-
+ ( $val, $msg ) = $UserObj->Create(
+ Name => $Name,
+ EmailAddress => $ARGS{'EmailAddress'},
+ Name => $ARGS{'Name'},
+ Comments => $ARGS{'Comments'},
+ Signature => $ARGS{'Signature'},
+ EmailAddress => $ARGS{'EmailAddress'},
+ FreeformContactInfo => $ARGS{'FreeformContactInfo'},
+ Organization => $ARGS{'Organization'},
+ RealName => $ARGS{'RealName'},
+ NickName => $ARGS{'NickName'},
+ Lang => $ARGS{'Lang'},
+ EmailEncoding => $ARGS{'EmailEncoding'},
+ WebEncoding => $ARGS{'WebEncoding'},
+ ExternalContactInfoId => $ARGS{'ExternalContactInfoId'},
+ ContactInfoSystem => $ARGS{'ContactInfoSystem'},
+ Gecos => $ARGS{'Gecos'},
+ ExternalAuthId => $ARGS{'ExternalAuthId'},
+ AuthSystem => $ARGS{'AuthSystem'},
+ HomePhone => $ARGS{'HomePhone'},
+ WorkPhone => $ARGS{'WorkPhone'},
+ MobilePhone => $ARGS{'MobilePhone'},
+ PagerPhone => $ARGS{'PagerPhone'},
+ Address1 => $ARGS{'Address1'},
+ Address2 => $ARGS{'Address2'},
+ City => $ARGS{'City'},
+ State => $ARGS{'State'},
+ Zip => $ARGS{'Zip'},
+ Country => $ARGS{'Country'},
+ Privileged => $ARGS{'Privileged'},
+ Disabled => ($ARGS{'Enabled'} ? 0 : 1)
+ );
if ($val) {
push @results, $msg;
} else {
push @results, loc('User could not be created: [_1]', $msg);
- }
+ }
+
+ # set the id, so the the menu will have the right info
+ $id = $UserObj->Id;
} else {
$UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
$val = $UserObj->Id();
@@ -299,13 +283,14 @@ else {
if ($val) {
$title = loc("Modify the user [_1]", $UserObj->Name);
- }
+ }
# If the create failed
else {
$title = loc("Create a new user");
$Create = 1;
- }
+ }
+
}
@@ -313,55 +298,49 @@ else {
# If we have a user to modify, lets try.
if ($UserObj->Id && $id ne 'new') {
-
+
my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
Organization RealName NickName Lang EmailEncoding WebEncoding
ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country
+ Address2 City State Zip Country
);
-
+
my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
Object => $UserObj,
ARGSRef => \%ARGS );
push (@results,@fieldresults);
- push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
- # {{{ Deal with special fields: Privileged, Enabled
- if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
- my ($code, $msg) = $UserObj->SetPrivileged($Privileged);
- push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
- }
-
- #we're asking about enabled on the web page but really care about disabled.
- $Disabled = $Enabled ? 0 : 1;
+# {{{ Deal with special fields: Privileged, Enabled and Password
+if ( ($SetPrivileged) and ( $Privileged != $UserObj->Privileged) ) {
+my ($code, $msg) = $UserObj->SetPrivileged($Privileged);
+ push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
+}
- if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) {
- my ($code, $msg) = $UserObj->SetDisabled($Disabled);
- push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
- }
+#we're asking about enabled on the web page but really care about disabled.
+if ($Enabled == 1) {
+ $Disabled = 0;
+}
+else {
+ $Disabled = 1;
+}
+if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) {
+ my ($code, $msg) = $UserObj->SetDisabled($Disabled);
+ push @results, loc('Enabled status [_1]', loc_fuzzy($msg));
+}
- # }}}
+#TODO: make this report errors properly
+if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$UserObj->IsPassword($Pass1))) {
+ my ($code, $msg);
+ ($code, $msg) = $UserObj->SetPassword($Pass1);
+ push @results, loc('Password: [_1]', loc_fuzzy($msg));
+} elsif ( $Pass1 && ($Pass1 ne $Pass2)) {
+ push @results, loc("Passwords do not match.");
}
-if ( $UserObj->Id ) {
- my $password_not_set;
- # Deal with Password field
- if ( !$Pass1 and !$Pass2 ) {
- $password_not_set = 1;
- } elsif ( $Pass1 ne $Pass2 ) {
- $password_not_set = 1;
- push @results, loc("Passwords do not match.");
- } elsif ( $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) {
- my ($code, $msg) = $UserObj->SetPassword($Pass1);
- push @results, loc_fuzzy($msg);
- $password_not_set = 1 unless $code;
- }
- if ($id eq 'new' and $password_not_set) {
- push @results, loc("A password was not set, so user won't be able to login.");
- }
+# }}}
}
@@ -375,11 +354,6 @@ if ($UserObj->Privileged()) {
}
# }}}
-
-# set the id, so the the menu will have the right info, this needs to
-# be done here to avoid creating and then modifying a user
-$id = $UserObj->Id;
-
</%INIT>
diff --git a/rt/html/Admin/Users/index.html b/rt/html/Admin/Users/index.html
index 1bbe867f7..f4cf2f0fc 100644
--- a/rt/html/Admin/Users/index.html
+++ b/rt/html/Admin/Users/index.html
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,33 +42,30 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('Select a user') &>
<& /Admin/Elements/UserTabs, current_tab => 'Admin/Users/',
current_subtab => 'Admin/Users/',
Title => loc('Select a user') &>
-<h1><%$caption%></h1>
-<p><&|/l&>Select a user</&>:</p>
-<ul>
+
+
+
+<%$caption%>:<BR>
+<UL>
%if ($users->Count == 0) {
-<li><i><&|/l&>No users matching search criteria found.</&></i></li>
+<LI> <i><&|/l&>No users matching search criteria found.</&></i>
% }
-%my @ids;
%while ( $user = $users->Next) {
-% push @ids, $user->Id;
<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || loc('(no name listed)')%></a></LI>
%}
-</UL>
-%if (my $ids = join(',', @ids)) {
-<em>(<a href="<%$RT::WebPath%>/Download/Tabular/User/<% $ids %>/Users.tsv"><&|/l&>Download as a tab-delimited file</&></a>)</em><br>
-%}
+</UL>
<br><br>
<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/index.html">
<&|/l&>Find people whose</&> <& /Elements/SelectUsers &><BR>
-<input type="checkbox" name="FindDisabledUsers" value="1"> <&|/l&>Include disabled users in search.</&>
+<input type="checkbox" name="FindDisabledUsers"> <&|/l&>Include disabled users in search.</&>
<BR>
<div align=right><input type=submit value="<&|/l&>Go!</&>"></div>
</FORM>
@@ -81,26 +78,19 @@ if ($FindDisabledUsers) {
$users->{'find_disabled_rows'} = 1;
}
-if (length $UserString) {
- $caption = loc("Users matching search criteria");
- if ($UserField =~ /^CustomField-(\d+)/) {
- $users->LimitCustomField(
- CUSTOMFIELD => $1,
- OPERATOR => $UserOp,
- VALUE => $UserString,
- );
- }
- else {
- $users->Limit(
- FIELD => $UserField,
- OPERATOR => $UserOp,
- VALUE => $UserString,
- );
- }
+unless (defined $UserString) {
+ $users->LimitToPrivileged();
+ $caption = loc("Privileged users");
}
else {
- $caption = loc("Privileged users");
- $users->LimitToPrivileged;
+ $caption = loc("Users matching search criteria");
+
+ if ($UserString) {
+ $users->Limit( FIELD => $UserField,
+ OPERATOR => $UserOp,
+ VALUE => $UserString);
+
+}
}
</%INIT>
<%ARGS>
diff --git a/rt/html/Admin/autohandler b/rt/html/Admin/autohandler
deleted file mode 100644
index def61010a..000000000
--- a/rt/html/Admin/autohandler
+++ /dev/null
@@ -1,51 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
-%# <jesse@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., 675 Mass Ave, Cambridge, MA 02139, USA.
-%#
-%#
-%# 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 }}}
-<%init>
-$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight(
- Right => 'ShowConfigTab',
- Object => $RT::System,
-);
-</%init> \ No newline at end of file
diff --git a/rt/html/Admin/index.html b/rt/html/Admin/index.html
index 01ba24d2d..5aec88b9d 100644
--- a/rt/html/Admin/index.html
+++ b/rt/html/Admin/index.html
@@ -1,11 +1,11 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
-%# (Except where explicitly superseded by other copyright notices),
+%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
@@ -31,7 +31,7 @@
%# 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.),
+%# 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
@@ -42,58 +42,21 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
<& /Admin/Elements/Header, Title => loc('RT Administration') &>
<& /Admin/Elements/Tabs, Title => loc('RT Administration') &>
<ul>
-% foreach my $key (sort keys %$tabs) {
-<li><font size="+2"><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></font><br>
-<%$tabs->{$key}->{description}%>
+<li><font size="+2"><a href="Users/"><&|/l&>Users</&></a></font><br>
+<&|/l&>Manage users and passwords</&>
+</li>
+<li><font size="+2"><a href="Groups/"><&|/l&>Groups</&></a></font><br>
+<&|/l&>Manage groups and group membership</&>
+</li>
+<li><font size="+2"><a href="Queues/"><&|/l&>Queues</&></a></font><br>
+<&|/l&>Manage queues and queue-specific properties</&>
+</li>
+<li><font size="+2"><a href="Global/"><&|/l&>Global</&></a></font><br>
+<&|/l&>Manage properties and configuration which apply to all queues</&>
</li>
-%}
</ul>
-<%init>
-
-
-
-my $tabs = {
- A => {
- title => loc('Users'),
- path => 'Admin/Users/index.html',
- description => loc('Manage users and passwords'),
- },
- B => {
- title => loc('Groups'),
- path => 'Admin/Groups/index.html',
- description => loc('Manage groups and group membership'),
- },
- C => {
- title => loc('Queues'),
- path => 'Admin/Queues/index.html',
- description => loc('Manage queues and queue-specific properties'),
- },
- D => {
- 'title' => loc('Custom Fields'),
- description => loc('Manage custom fields and custom field values'),
- path => 'Admin/CustomFields/index.html',
- },
- E => {
- 'title' => loc('Global'),
- path => 'Admin/Global/index.html',
- description =>
- loc('Manage properties and configuration which apply to all queues'),
- },
- F => {
- 'title' => loc('Tools'),
- path => 'Admin/Tools/index.html',
- description => loc('Use other RT administrative tools')
- },
-};
-
- $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
-
-
-
-
-</%init>