summaryrefslogtreecommitdiff
path: root/rt/html/Admin/Elements
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/Admin/Elements')
-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
41 files changed, 316 insertions, 880 deletions
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