From 8103c1fc1b2c27a6855feadf26f91b980a54bc52 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 2 Mar 2008 04:11:51 +0000 Subject: import rt 3.6.6 --- rt/html/Admin/Elements/AddCustomFieldValue | 44 ++-- rt/html/Admin/Elements/CreateUserCalled | 10 +- rt/html/Admin/Elements/CustomFieldTabs | 6 +- rt/html/Admin/Elements/EditCustomField | 56 ++--- rt/html/Admin/Elements/EditCustomFieldValues | 24 +- rt/html/Admin/Elements/EditCustomFields | 34 ++- rt/html/Admin/Elements/EditQueueWatchers | 12 +- rt/html/Admin/Elements/EditScrip | 242 ++++++++++----------- rt/html/Admin/Elements/EditScrips | 34 +-- rt/html/Admin/Elements/EditTemplates | 50 +++-- rt/html/Admin/Elements/EditUserComments | 14 +- rt/html/Admin/Elements/GlobalCustomFieldTabs | 6 +- rt/html/Admin/Elements/GroupTabs | 6 +- rt/html/Admin/Elements/Header | 6 +- rt/html/Admin/Elements/ListGlobalCustomFields | 8 +- rt/html/Admin/Elements/ListGlobalScrips | 19 +- rt/html/Admin/Elements/ModifyTemplate | 56 ++--- rt/html/Admin/Elements/ObjectCustomFields | 6 +- rt/html/Admin/Elements/PickCustomFields | 40 ++-- rt/html/Admin/Elements/PickObjects | 39 ++-- rt/html/Admin/Elements/QueueRightsForUser | 12 +- rt/html/Admin/Elements/QueueTabs | 6 +- rt/html/Admin/Elements/SelectCustomFieldLookupType | 12 +- rt/html/Admin/Elements/SelectCustomFieldType | 12 +- rt/html/Admin/Elements/SelectGroups | 12 +- rt/html/Admin/Elements/SelectModifyGroup | 8 +- rt/html/Admin/Elements/SelectModifyQueue | 8 +- rt/html/Admin/Elements/SelectModifyUser | 8 +- rt/html/Admin/Elements/SelectNewGroupMembers | 24 +- rt/html/Admin/Elements/SelectRights | 40 ++-- rt/html/Admin/Elements/SelectScrip | 18 +- rt/html/Admin/Elements/SelectScripAction | 19 +- rt/html/Admin/Elements/SelectScripCondition | 20 +- rt/html/Admin/Elements/SelectSingleOrMultiple | 6 +- rt/html/Admin/Elements/SelectStage | 12 +- rt/html/Admin/Elements/SelectTemplate | 24 +- rt/html/Admin/Elements/SelectUsers | 12 +- rt/html/Admin/Elements/SystemTabs | 11 +- rt/html/Admin/Elements/Tabs | 6 +- rt/html/Admin/Elements/ToolTabs | 6 +- rt/html/Admin/Elements/UserTabs | 9 +- 41 files changed, 553 insertions(+), 444 deletions(-) (limited to 'rt/html/Admin/Elements') diff --git a/rt/html/Admin/Elements/AddCustomFieldValue b/rt/html/Admin/Elements/AddCustomFieldValue index 3e3f414b3..39916e5ab 100644 --- a/rt/html/Admin/Elements/AddCustomFieldValue +++ b/rt/html/Admin/Elements/AddCustomFieldValue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,22 +45,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&|/l&>Add Value - - - - -
-<&|/l&>Sort:
- -
-<&|/l&>Name:
- -
-<&|/l&>Description:
- -
- +<&|/l&>Add Value + + + + +% if ($CustomField->Type ne 'Combobox') { + +% } + +
+<&|/l&>Sort:
+ +
+<&|/l&>Name:
+ +
+<&|/l&>Description:
+ +
+<&|/l&>Category:
+ +
<%init> <%args> diff --git a/rt/html/Admin/Elements/CreateUserCalled b/rt/html/Admin/Elements/CreateUserCalled index 0dc6ac792..69183258e 100644 --- a/rt/html/Admin/Elements/CreateUserCalled +++ b/rt/html/Admin/Elements/CreateUserCalled @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,6 +45,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
-<&|/l&>New user called + +<&|/l&>New user called
diff --git a/rt/html/Admin/Elements/CustomFieldTabs b/rt/html/Admin/Elements/CustomFieldTabs index d7acf33cc..078dbe0de 100644 --- a/rt/html/Admin/Elements/CustomFieldTabs +++ b/rt/html/Admin/Elements/CustomFieldTabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Admin/Elements/EditCustomField b/rt/html/Admin/Elements/EditCustomField index d8c5b29b2..d6dda06f3 100644 --- a/rt/html/Admin/Elements/EditCustomField +++ b/rt/html/Admin/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,43 +48,43 @@ <& /Elements/ListActions, actions => \@results &> -
- - + + + - - + +
+ + - + - + - -
<&|/l&>Name: - - -
+ + +
<&|/l&>Description: - - -
+ + +
<&|/l&>Type: - + <& /Admin/Elements/SelectCustomFieldType, Name => "Type", Default => $CustomFieldObj->Type &> -
- - -> <&|/l&>Enabled (Unchecking this box disables this custom field) -
- -

+

+ + + /> <&|/l&>Enabled (Unchecking this box disables this custom field) +
+ +

% if ($CustomFieldObj->Id and $CustomFieldObj->Type =~ /Select/) {

<&|/l&>Values

- + <& /Admin/Elements/EditCustomFieldValues, CustomField => $CustomFieldObj &> <& /Admin/Elements/AddCustomFieldValue, CustomField => $CustomFieldObj &> % } <&/Elements/Submit, Label => loc('Create') &> - + diff --git a/rt/html/Admin/Elements/EditCustomFieldValues b/rt/html/Admin/Elements/EditCustomFieldValues index 9cc3858b9..e7da87cf7 100644 --- a/rt/html/Admin/Elements/EditCustomFieldValues +++ b/rt/html/Admin/Elements/EditCustomFieldValues @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,23 +56,33 @@ <&|/l&>Sort <&|/l&>Name <&|/l&>Description +% if ($CustomField->Type ne 'Combobox') { +<&|/l&>Category +% } % while (my $value = $values->Next) { - + + + + - + - + + + +% if ($CustomField->Type ne 'Combobox') { - + +% } % } diff --git a/rt/html/Admin/Elements/EditCustomFields b/rt/html/Admin/Elements/EditCustomFields index 1cd3df568..9b1176a40 100644 --- a/rt/html/Admin/Elements/EditCustomFields +++ b/rt/html/Admin/Elements/EditCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,11 +47,11 @@ %# END BPS TAGGED BLOCK }}} <& /Elements/ListActions, actions => \@results &> -
- - - - + + + + + % if ($Object->Id) {

<&|/l&>Global Custom Fields

@@ -61,7 +63,7 @@ <& PickCustomFields, CustomFields => \@UnassignedCFs, id => $id, SubType => $SubType &> <& /Elements/Submit, CheckAll => 1, ClearAll => 1 &> -
+ <%INIT> @@ -71,7 +73,7 @@ my (@GlobalCFs, @UnassignedCFs); my $id = $Object->Id; if ($id and !$Object->CurrentUserHasRight('AssignCustomFields')) { - $m->out('

', loc('(No custom fields)'), '

'); + $m->out('

', loc('(No custom fields)'), '

'); return; } @@ -88,6 +90,20 @@ $ObjectCFs->UnLimit; $ObjectCFs->LimitToObjectId($id); $ObjectCFs->LimitToLookupType($lookup); +# Check sanity of SortOrders +my %SortOrders; +$SortOrders{$_->SortOrder}++ + while ($_ = $ObjectCFs->Next); + +# If there are duplicates, run though and squash them +if (grep {$_ > 1} values %SortOrders) { + my $i = 1; + while (my $ObjectCF = $ObjectCFs->Next) { + $ObjectCF->SetSortOrder($i++); + } + $ObjectCFs->GotoFirstItem; +} + # {{{ deal with moving sortorder of custom fields if ($CustomField and $Move) { my $SourceObj = RT::ObjectCustomField->new($session{'CurrentUser'}); diff --git a/rt/html/Admin/Elements/EditQueueWatchers b/rt/html/Admin/Elements/EditQueueWatchers index c93bf81f5..dc076f58a 100644 --- a/rt/html/Admin/Elements/EditQueueWatchers +++ b/rt/html/Admin/Elements/EditQueueWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,12 +49,12 @@