From 1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 9 Jul 2015 22:18:55 -0700 Subject: RT 4.2.11, ticket#13852 --- .../html/Admin/Elements/ConfigureDashboardsInMenu | 76 +++++++++ rt/share/html/Admin/Elements/CreateUserCalled | 50 ------ rt/share/html/Admin/Elements/EditCustomField | 15 +- .../Admin/Elements/EditCustomFieldValuesSource | 4 +- rt/share/html/Admin/Elements/EditCustomFields | 23 +-- rt/share/html/Admin/Elements/EditQueueWatchers | 7 +- rt/share/html/Admin/Elements/EditRights | 39 ++--- .../html/Admin/Elements/EditRightsCategoryTabs | 15 +- rt/share/html/Admin/Elements/EditScrips | 171 ++++++++++++++------- rt/share/html/Admin/Elements/EditTemplates | 2 + rt/share/html/Admin/Elements/EditUserComments | 56 ------- .../html/Admin/Elements/ListGlobalCustomFields | 61 -------- rt/share/html/Admin/Elements/ListGlobalScrips | 68 -------- rt/share/html/Admin/Elements/LoggingSummary | 92 +++++++++++ rt/share/html/Admin/Elements/MembershipsPage | 152 ++++++++++++++++++ rt/share/html/Admin/Elements/ModifyTemplate | 11 +- rt/share/html/Admin/Elements/PickCustomFields | 98 ------------ rt/share/html/Admin/Elements/PickObjects | 81 ---------- rt/share/html/Admin/Elements/Portal | 2 +- rt/share/html/Admin/Elements/QueueRightsForUser | 64 -------- rt/share/html/Admin/Elements/SelectGroups | 2 +- rt/share/html/Admin/Elements/SelectModifyGroup | 57 ------- rt/share/html/Admin/Elements/SelectModifyQueue | 57 ------- rt/share/html/Admin/Elements/SelectModifyUser | 73 --------- rt/share/html/Admin/Elements/SelectNewGroupMembers | 42 ++--- rt/share/html/Admin/Elements/SelectRights | 120 --------------- rt/share/html/Admin/Elements/SelectScrip | 72 --------- .../html/Admin/Elements/SelectSingleOrMultiple | 67 -------- rt/share/html/Admin/Elements/SelectStage | 18 +-- rt/share/html/Admin/Elements/SelectStageForAdded | 54 +++++++ rt/share/html/Admin/Elements/SelectTemplate | 77 ---------- rt/share/html/Admin/Elements/ShowKeyInfo | 49 ++++-- rt/share/html/Admin/Elements/UpgradeHistory | 71 +++++++++ rt/share/html/Admin/Elements/UpgradeHistoryRow | 98 ++++++++++++ 34 files changed, 785 insertions(+), 1159 deletions(-) create mode 100644 rt/share/html/Admin/Elements/ConfigureDashboardsInMenu delete mode 100755 rt/share/html/Admin/Elements/CreateUserCalled delete mode 100755 rt/share/html/Admin/Elements/EditUserComments delete mode 100755 rt/share/html/Admin/Elements/ListGlobalCustomFields delete mode 100755 rt/share/html/Admin/Elements/ListGlobalScrips create mode 100644 rt/share/html/Admin/Elements/LoggingSummary create mode 100644 rt/share/html/Admin/Elements/MembershipsPage delete mode 100644 rt/share/html/Admin/Elements/PickCustomFields delete mode 100644 rt/share/html/Admin/Elements/PickObjects delete mode 100755 rt/share/html/Admin/Elements/QueueRightsForUser delete mode 100755 rt/share/html/Admin/Elements/SelectModifyGroup delete mode 100755 rt/share/html/Admin/Elements/SelectModifyQueue delete mode 100755 rt/share/html/Admin/Elements/SelectModifyUser delete mode 100755 rt/share/html/Admin/Elements/SelectRights delete mode 100755 rt/share/html/Admin/Elements/SelectScrip delete mode 100755 rt/share/html/Admin/Elements/SelectSingleOrMultiple create mode 100644 rt/share/html/Admin/Elements/SelectStageForAdded delete mode 100755 rt/share/html/Admin/Elements/SelectTemplate create mode 100644 rt/share/html/Admin/Elements/UpgradeHistory create mode 100644 rt/share/html/Admin/Elements/UpgradeHistoryRow (limited to 'rt/share/html/Admin/Elements') diff --git a/rt/share/html/Admin/Elements/ConfigureDashboardsInMenu b/rt/share/html/Admin/Elements/ConfigureDashboardsInMenu new file mode 100644 index 000000000..2b16af575 --- /dev/null +++ b/rt/share/html/Admin/Elements/ConfigureDashboardsInMenu @@ -0,0 +1,76 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%args> +$Action +$OnSave +$items +$panes +$current_portlets +$ReadOnly => 0 + +<%init> +my $portlets = $current_portlets; +my @panes; +for my $pane (@$panes) { + push @panes, $m->comp( + '/Widgets/SelectionBox:new', + Action => $Action, + Name => $pane, + Available => $items, + AutoSave => 1, + ReadOnly => $ReadOnly, + OnSubmit => sub { + my $sel = shift; + $OnSave->( { dashboards => $sel->{Current} } ); + }, + Selected => $portlets, + ); +} + +return @panes; + diff --git a/rt/share/html/Admin/Elements/CreateUserCalled b/rt/share/html/Admin/Elements/CreateUserCalled deleted file mode 100755 index fb15893f0..000000000 --- a/rt/share/html/Admin/Elements/CreateUserCalled +++ /dev/null @@ -1,50 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC -%# -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -
-<&|/l&>New user called -
diff --git a/rt/share/html/Admin/Elements/EditCustomField b/rt/share/html/Admin/Elements/EditCustomField index d58bed5c7..500e91191 100755 --- a/rt/share/html/Admin/Elements/EditCustomField +++ b/rt/share/html/Admin/Elements/EditCustomField @@ -71,7 +71,8 @@ - /> <&|/l&>Enabled (Unchecking this box disables this custom field) + /> + @@ -100,19 +101,19 @@ if (! $CustomField ) { } else { if ($CustomField eq 'new') { - my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, - Name => $Name, + my ($val, $msg) = $CustomFieldObj->Create(Queue => $Queue, + Name => $Name, Type => $Type, Description => $Description, - ); - + ); + # if there is an error, then abort. But since at this point there's # stuff already printed, clear it out. # (This only works in conjunction with temporarily turning autoflush # off in the files that use this component.) unless ($val) { - $m->clear_buffer; - Abort(loc("Could not create CustomField: [_1]", $msg), SuppressHeader => 1); + $m->clear_buffer; + Abort(loc("Could not create CustomField: [_1]", $msg), SuppressHeader => 1); } push @results, $msg; $CustomFieldObj->SetSortOrder($CustomFieldObj->id); diff --git a/rt/share/html/Admin/Elements/EditCustomFieldValuesSource b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource index 79029cae1..2198e4cf4 100644 --- a/rt/share/html/Admin/Elements/EditCustomFieldValuesSource +++ b/rt/share/html/Admin/Elements/EditCustomFieldValuesSource @@ -60,9 +60,7 @@ my @sources; foreach my $class( 'RT::CustomFieldValues', RT->Config->Get('CustomFieldValuesSources') ) { next unless $class; - local $@; - eval "require $class"; - if( $@ ) { + unless ($class->require) { $RT::Logger->crit("Couldn't load class '$class': $@"); next; } diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields index 904a82c97..5ad1ec58d 100755 --- a/rt/share/html/Admin/Elements/EditCustomFields +++ b/rt/share/html/Admin/Elements/EditCustomFields @@ -55,7 +55,7 @@

<&|/l&>Selected Custom Fields

<& /Elements/CollectionList, %ARGS, - Collection => $applied_cfs, + Collection => $added_cfs, Rows => 0, Page => 1, Format => $format, @@ -73,8 +73,8 @@ OrderBy => 'Name', Order => 'ASC', %ARGS, - Collection => $not_applied_cfs, - Rows => 50, + Collection => $not_added_cfs, + Rows => $rows, Format => $format, DisplayFormat => "'__CheckBox.{AddCustomField}__',". $format, AllowSorting => 1, @@ -152,17 +152,18 @@ if ( $UpdateCFs ) { $m->callback(CallbackName => 'UpdateExtraFields', Results => \@results, Object => $Object, %ARGS); -my $applied_cfs = RT::CustomFields->new( $session{'CurrentUser'} ); -$applied_cfs->LimitToLookupType($lookup); -$applied_cfs->LimitToGlobalOrObjectId($id); -$applied_cfs->SetContextObject( $Object ); -$applied_cfs->ApplySortOrder; +my $added_cfs = RT::CustomFields->new( $session{'CurrentUser'} ); +$added_cfs->LimitToLookupType($lookup); +$added_cfs->LimitToGlobalOrObjectId($id); +$added_cfs->SetContextObject( $Object ); +$added_cfs->ApplySortOrder; -my $not_applied_cfs = RT::CustomFields->new( $session{'CurrentUser'} ); -$not_applied_cfs->LimitToLookupType($lookup); -$not_applied_cfs->LimitToNotApplied( $id ? ($id, 0) : (0) ); +my $not_added_cfs = RT::CustomFields->new( $session{'CurrentUser'} ); +$not_added_cfs->LimitToLookupType($lookup); +$not_added_cfs->LimitToNotAdded( $id ? ($id, 0) : (0) ); my $format = RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'}; +my $rows = RT->Config->Get('AdminSearchResultRows')->{'CustomFields'} || 50; my $display_format = $id ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'") diff --git a/rt/share/html/Admin/Elements/EditQueueWatchers b/rt/share/html/Admin/Elements/EditQueueWatchers index 98c13931a..c4c1a6f4a 100755 --- a/rt/share/html/Admin/Elements/EditQueueWatchers +++ b/rt/share/html/Admin/Elements/EditQueueWatchers @@ -52,13 +52,12 @@