summaryrefslogtreecommitdiff
path: root/rt/share/html/Admin/Elements
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Admin/Elements')
-rw-r--r--[-rwxr-xr-x]rt/share/html/Admin/Elements/ConfigureDashboardsInMenu (renamed from rt/share/html/Admin/Elements/ListGlobalCustomFields)41
-rwxr-xr-xrt/share/html/Admin/Elements/EditCustomField15
-rw-r--r--rt/share/html/Admin/Elements/EditCustomFieldValuesSource4
-rwxr-xr-xrt/share/html/Admin/Elements/EditCustomFields23
-rwxr-xr-xrt/share/html/Admin/Elements/EditQueueWatchers7
-rw-r--r--rt/share/html/Admin/Elements/EditRights39
-rw-r--r--rt/share/html/Admin/Elements/EditRightsCategoryTabs15
-rwxr-xr-xrt/share/html/Admin/Elements/EditScrips171
-rwxr-xr-xrt/share/html/Admin/Elements/EditTemplates2
-rwxr-xr-xrt/share/html/Admin/Elements/EditUserComments56
-rw-r--r--[-rwxr-xr-x]rt/share/html/Admin/Elements/LoggingSummary (renamed from rt/share/html/Admin/Elements/ListGlobalScrips)58
-rw-r--r--rt/share/html/Admin/Elements/MembershipsPage152
-rwxr-xr-xrt/share/html/Admin/Elements/ModifyTemplate11
-rw-r--r--rt/share/html/Admin/Elements/Portal2
-rwxr-xr-xrt/share/html/Admin/Elements/QueueRightsForUser64
-rwxr-xr-xrt/share/html/Admin/Elements/SelectGroups2
-rwxr-xr-xrt/share/html/Admin/Elements/SelectModifyGroup57
-rwxr-xr-xrt/share/html/Admin/Elements/SelectModifyQueue57
-rwxr-xr-xrt/share/html/Admin/Elements/SelectModifyUser73
-rwxr-xr-xrt/share/html/Admin/Elements/SelectNewGroupMembers42
-rwxr-xr-xrt/share/html/Admin/Elements/SelectRights120
-rwxr-xr-xrt/share/html/Admin/Elements/SelectScrip72
-rwxr-xr-xrt/share/html/Admin/Elements/SelectSingleOrMultiple67
-rw-r--r--rt/share/html/Admin/Elements/SelectStage18
-rw-r--r--[-rwxr-xr-x]rt/share/html/Admin/Elements/SelectStageForAdded (renamed from rt/share/html/Admin/Elements/CreateUserCalled)10
-rwxr-xr-xrt/share/html/Admin/Elements/SelectTemplate77
-rw-r--r--rt/share/html/Admin/Elements/ShowKeyInfo49
-rw-r--r--rt/share/html/Admin/Elements/UpgradeHistory (renamed from rt/share/html/Admin/Elements/PickObjects)52
-rw-r--r--rt/share/html/Admin/Elements/UpgradeHistoryRow (renamed from rt/share/html/Admin/Elements/PickCustomFields)96
29 files changed, 539 insertions, 913 deletions
diff --git a/rt/share/html/Admin/Elements/ListGlobalCustomFields b/rt/share/html/Admin/Elements/ConfigureDashboardsInMenu
index 39caa42ea..2b16af575 100755..100644
--- a/rt/share/html/Admin/Elements/ListGlobalCustomFields
+++ b/rt/share/html/Admin/Elements/ConfigureDashboardsInMenu
@@ -45,17 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% my $count = 0;
-% while (my $CustomFieldObj = $CustomFields->Next) {
-% $count++;
-<font size="-1"><%$CustomFieldObj->id%>/<% loc($CustomFieldObj->Type) %>/<%$CustomFieldObj->Name%>: <%$CustomFieldObj->Description%></font>
-<br />
-% }
-% if (!$count) {
-<font size="-1"><&|/l&>(No custom fields)</&></font>
-% }
-
+<%args>
+$Action
+$OnSave
+$items
+$panes
+$current_portlets
+$ReadOnly => 0
+</%args>
<%init>
-my $CustomFields = RT::CustomFields->new ($session{'CurrentUser'});
-$CustomFields->LimitToGlobal();
-</%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;
+</%init>
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 @@
<tr><td>
</td><td>
<input type="hidden" class="hidden" name="SetEnabled" value="1" />
-<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this custom field)</&>
+<input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked%> />
+<label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this custom field)</&></label>
</td></tr>
</table>
@@ -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 @@
<h2><&|/l&>Selected Custom Fields</&></h2>
<& /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 @@
<ul>
% while (my $watcher=$Members->Next) {
<li>
-<input type="checkbox" class="checkbox" name="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+<input type="checkbox" class="checkbox" name="Queue-<%$QueueObj->Id%>-DeleteWatcher-Type-<%$Watchers->Name%>-Principal-<%$watcher->MemberId%>" value="1"
unchecked />
% if ($watcher->MemberObj->IsUser) {
-<a href="<%RT->Config->Get('WebPath')%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
-<& /Elements/ShowUser, User => $watcher->MemberObj->Object &></a>
+<& /Elements/ShowUser, User => $watcher->MemberObj->Object &>
% } else {
-<a href="<%RT->Config->Get('WebPath')%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->ObjectId%>">
+<a href="<%RT->Config->Get('WebPath')%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->Id%>">
<%$watcher->MemberObj->Object->Name%></a>
% }
% }
diff --git a/rt/share/html/Admin/Elements/EditRights b/rt/share/html/Admin/Elements/EditRights
index ff8aece17..bd861310f 100644
--- a/rt/share/html/Admin/Elements/EditRights
+++ b/rt/share/html/Admin/Elements/EditRights
@@ -51,8 +51,6 @@ $Principals
$AddPrincipal => undef
</%args>
<%init>
-use Scalar::Util qw(blessed);
-
# Let callbacks get at principals and context before we do anything with them
$m->callback( Principals => $Principals, Context => $Context );
@@ -94,22 +92,23 @@ if ($anchor =~ /AddPrincipal/) {
sync_anchor(<% $anchor |n,j %>);
jQuery(".rights-editor").tabs({
- select: function(ev, ui) {
- sync_anchor(ui.tab.hash);
- if ( jQuery(ui.tab).find('input[type=text]').size() > 0 ) {
- jQuery(ui.tab).find('input[type=text]:first').focus();
+ beforeActivate: function(ev, ui) {
+ sync_anchor(ui.newPanel.selector);
+ if ( ui.newTab.find('input[type=text]').size() > 0 ) {
+ ui.newTab.find('input[type=text]:first').focus();
}
}
});
jQuery(".rights-editor .category-tabs").tabs({
- cookie: { name: "rights-category-tab" /* saves current tab in cookie */ },
- show: function(ev, ui) {
+ active: jQuery.cookie('rights-category-tab') || 0,
+ activate: function(ev, ui) {
+ jQuery.cookie('rights-category-tab', ui.newTab.index());
jQuery(".rights-editor .category-tabs").not(this).each(function() {
var item = jQuery(this);
- var selected = item.tabs("option", "selected") || 0;
- if (selected != ui.index)
- item.tabs("select", ui.index);
+ var selected = item.tabs("option", "active") || 0;
+ if (selected != ui.newTab.index())
+ item.tabs("option", "active", ui.newTab.index());
});
}
});
@@ -140,21 +139,23 @@ for my $category (@$Principals) {
<li class="addprincipal">
<a href="#acl-AddPrincipal">
<input type="text" value=""
+ data-autocomplete="<% lc $AddPrincipal eq 'user' ? 'Users' : 'Groups' %>"
+% if ( lc $AddPrincipal eq 'user' ) {
+ data-autocomplete-return="Name"
+ data-autocomplete-privileged="1"
+% }
name="AddPrincipalForRights-<% lc $AddPrincipal %>"
id="AddPrincipalForRights-<% lc $AddPrincipal %>" />
<script type="text/javascript">
jQuery(function() {
jQuery("#AddPrincipalForRights-"+<% lc $AddPrincipal |n,j%>).keyup(function(){
toggle_addprincipal_validity(this, true);
+ }).keydown(function(event){
+ event.stopPropagation() // Disable tabs keyboard nav
});
-% if (lc $AddPrincipal eq 'group') {
- jQuery("#AddPrincipalForRights-"+<% lc $AddPrincipal |n,j%>).autocomplete({
- source: <% RT->Config->Get('WebPath') |n,j%>+"/Helpers/Autocomplete/Groups",
- select: addprincipal_onselect,
- change: addprincipal_onchange
- });
-% }
+ jQuery("#AddPrincipalForRights-"+<% lc $AddPrincipal |n,j%>).on("autocompleteselect", addprincipal_onselect);
+ jQuery("#AddPrincipalForRights-"+<% lc $AddPrincipal |n,j%>).on("autocompletechange", addprincipal_onchange);
});
</script>
% my $type = lc $AddPrincipal eq 'user' ? loc('username') : loc($AddPrincipal);
@@ -180,7 +181,7 @@ for my $category (@$Principals) {
if ($obj->isa('RT::Group') and $obj->Domain eq 'UserDefined') {
my $subgroups = $obj->GroupMembersObj( Recursively => 1 );
$subgroups->LimitToUserDefinedGroups;
- $subgroups->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => $obj->Name );
+ $subgroups->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => $obj->Name, CASESENSITIVE => 0 );
if ( $subgroups->Count ) {
my $inc = join ", ", map $_->Name, @{$subgroups->ItemsArrayRef};
diff --git a/rt/share/html/Admin/Elements/EditRightsCategoryTabs b/rt/share/html/Admin/Elements/EditRightsCategoryTabs
index b6eb18900..6174e68d7 100644
--- a/rt/share/html/Admin/Elements/EditRightsCategoryTabs
+++ b/rt/share/html/Admin/Elements/EditRightsCategoryTabs
@@ -52,15 +52,10 @@ $id
$acldesc => ''
</%args>
<%init>
-# XXX OPTIMIZATION: Moving the calls to AvailableRights and RightCategories up
-# one component to avoid calling them for every principal would be a win, but
-# it's cleaner to do it here. The values can really be computed once per
-# $Context.
-
# Find all our available rights...
my (%available_rights, %categories);
if ( blessed($Context) and $Context->can('AvailableRights') ) {
- %available_rights = %{$Context->AvailableRights};
+ %available_rights = %{$Context->AvailableRights( $Principal ? $Principal->PrincipalObj : undef )};
} else {
%available_rights = ( loc('System Error') => loc("No rights found") );
}
@@ -104,6 +99,8 @@ for my $category ( sort keys %categories ) {
$acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'),
ref($Context), $Context->Id;
+
+$available_rights{$_} = loc( $available_rights{$_} ) for keys %available_rights;
</%init>
<div class="category-tabs">
<ul>
@@ -121,10 +118,10 @@ $acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'),
id="SetRights-<% $acldesc %>-<% $right %>"
value="<% $right %>"
<% $current_rights{$right} ? 'checked' : '' %> />
- <label for="SetRights-<% $acldesc %>-<% $right %>" title="<% loc($right) %>">
- <% loc($available_rights{$right}) %>
+ <label for="SetRights-<% $acldesc %>-<% $right %>" title="<% $right %>">
+ <% $available_rights{$right} %>
<span class="separator">&mdash;</span>
- <span class="rightname"><% loc($right) %></span>
+ <span class="rightname"><% $right %></span>
</label>
</li>
% }
diff --git a/rt/share/html/Admin/Elements/EditScrips b/rt/share/html/Admin/Elements/EditScrips
index 127677d79..759470719 100755
--- a/rt/share/html/Admin/Elements/EditScrips
+++ b/rt/share/html/Admin/Elements/EditScrips
@@ -50,86 +50,151 @@
<form action="Scrips.html" method="post">
<input type="hidden" class="hidden" name="id" value="<% $id %>" />
-<h2><&|/l&>Current Scrips</&></h2>
+<h2><&|/l&>Scrips</&></h2>
+<div class="admin-hint"><&|/l&>Scrips normally run after each individual change to a ticket.</&></div>
+% my $scrips = $find_scrips->(Stage => 'TransactionCreate');
+<& /Elements/CollectionList, %common_applied_args, Collection => $scrips &>
+% unless ( $scrips->Count ) {
+<p><i><&|/l&>(No scrips)</&></i></p>
+% }
+
+<h2><&|/l&>Batch scrips</&></h2>
+<div class="admin-hint"><&|/l&>Batch scrips run after a set of related changes to a ticket.</&></div>
+% $scrips = $find_scrips->(Stage => 'TransactionBatch');
+<& /Elements/CollectionList, %common_applied_args, Collection => $scrips &>
+% unless ( $scrips->Count ) {
+<p><i><&|/l&>(No scrips)</&></i></p>
+% }
+
+<& /Elements/Submit,
+ Name => 'RemoveScrips',
+ Caption => loc("Un-apply selected scrips"),
+ Label => loc("Update"),
+&>
+
+<h2><&|/l&>Not applied scrips</&></h2>
+% $scrips = $find_scrips->(Added => 0);
<& /Elements/CollectionList,
- OrderBy => 'Description',
- Order => 'ASC',
- Rows => 100,
+ Rows => $Rows,
+ Page => 1,
%ARGS,
- Format => $Format,
- DisplayFormat => "__CheckBox.{DeleteScrip}__, $Format",
- Collection => $Scrips,
+ Collection => $scrips,
+ Format => $Format,
+ DisplayFormat => "__CheckBox.{AddScrip}__, $Format",
AllowSorting => 1,
- PassArguments => [ qw(Query Format Rows Page Order OrderBy id) ],
+ PassArguments => [ qw(Format Rows Page Order OrderBy id) ],
&>
-
-% if ( $Scrips->Count ) {
-<p><i><&|/l&>(Check box to delete)</&></i></p>
-% } else {
+% unless ( $scrips->Count ) {
<p><i><&|/l&>(No scrips)</&></i></p>
% }
+
+<& SelectStageForAdded &>
+
<& /Elements/Submit,
- Caption => loc("Delete selected scrips"),
- Label => loc("Delete")
+ Name => 'AddScrips',
+ Caption => loc("Apply selected scrips"),
+ Label => loc("Update"),
&>
+
</form>
<%init>
my (@actions);
-my $Scrips = RT::Scrips->new($session{'CurrentUser'});
-
-my $QueueObj = RT::Queue->new($session{'CurrentUser'});
if ( $id ) {
+ my $QueueObj = RT::Queue->new($session{'CurrentUser'});
$QueueObj->Load( $id );
- unless ( $QueueObj->id ) {
- push @actions, loc("Couldn't load queue #[_1]", $id)
+ Abort(loc("Couldn't load queue #[_1]", $id)) unless $QueueObj->id;
+}
+$id ||= 0;
+
+my $find_scrips = sub {
+ my %args = (Added => 1, @_);
+ my $scrips = RT::Scrips->new($session{'CurrentUser'});
+ $scrips->LimitByStage( $args{'Stage'} )
+ if $args{'Stage'};
+ my $method = $args{'Added'}? 'LimitToAdded' : 'LimitToNotAdded';
+ $scrips->$method(0, $id);
+ $scrips->ApplySortOrder if $args{'Added'};
+ $scrips->FindAllRows;
+ return $scrips;
+};
+
+$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Scrips'} || 50;
+my $DisplayFormat = $Format;
+if ( $id ) {
+ $DisplayFormat = "__RemoveCheckBox__, $DisplayFormat";
+} else {
+ $DisplayFormat = "__CheckBox.{RemoveScrip}__, $DisplayFormat";
+}
+$DisplayFormat .= ", __Move.{$id}__";
+
+my %common_applied_args = (
+ %ARGS,
+ Format => $Format,
+ DisplayFormat => $DisplayFormat,
+ Rows => 0,
+ Page => 1,
+ AllowSorting => 0,
+ PassArguments => [ qw(Format id) ],
+);
+
+if ( $RemoveScrips ) {
+ foreach my $sid ( @RemoveScrip ) {
+ my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+ $scrip->Load( $sid );
+ next unless $scrip->id;
+
+ my ($status, $msg) = $scrip->RemoveFromObject( $id );
+ push @actions, $msg;
}
}
-if ($QueueObj->id) {
- $Scrips->LimitToQueue($id);
- $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Scrips'};
+if ( $AddScrips ) {
+ foreach my $sid ( @AddScrip ) {
+ my $scrip = RT::Scrip->new( $session{'CurrentUser'} );
+ $scrip->Load( $sid );
+ next unless $scrip->id;
+
+ my ($status, $msg) = $scrip->AddToObject( $id, Stage => $Stage );
+ push @actions, $msg;
+ }
}
-else {
- $Scrips->LimitToGlobal();
- $Format ||= RT->Config->Get('AdminSearchResultFormat')->{'GlobalScrips'};
+
+if ( $MoveScripUp ) {
+ my $scrip = RT::ObjectScrip->new( $session{'CurrentUser'} );
+ $scrip->LoadByCols( Scrip => $MoveScripUp, ObjectId => $id );
+ if ( $scrip->id ) {
+ my ($status, $msg) = $scrip->MoveUp;
+ push @actions, $msg;
+ }
}
-# deal with modifying and deleting existing scrips
-# we still support DeleteScrip-id format but array is preferred
-
-my @not_deleted;
-foreach my $id ( grep $_, @DeleteScrip, map /^DeleteScrip-(\d+)/, keys %ARGS ) {
- my $scrip = RT::Scrip->new($session{'CurrentUser'});
- $scrip->Load( $id );
- my $a = $scrip->FirstAttribute('Immutable');
- if ( defined($a) and $a->Content ) {
- # then disable the scrip instead of deleting it
- my ($retval, $msg) = $scrip->SetStage('Disabled');
- if ( $retval ) {
- push @actions, loc("Scrip disabled (cannot delete system scrips)");
- } else {
- push @actions, $msg;
- push @not_deleted, $id;
- }
- } else { # not an immutable scrip
- my ($retval, $msg) = $scrip->Delete;
- if ($retval) {
- push @actions, loc("Scrip deleted");
- }
- else {
- push @actions, $msg;
- push @not_deleted, $id;
- }
+if ( $MoveScripDown ) {
+ my $scrip = RT::ObjectScrip->new( $session{'CurrentUser'} );
+ $scrip->LoadByCols( Scrip => $MoveScripDown, ObjectId => $id );
+ if ( $scrip->id ) {
+ my ($status, $msg) = $scrip->MoveDown;
+ push @actions, $msg;
}
}
-$DECODED_ARGS->{DeleteScrip} = \@not_deleted;
+
</%init>
<%ARGS>
$id => undef
$title => undef
$Format => undef
-@DeleteScrip => ()
+
+@RemoveScrip => ()
+$RemoveScrips => undef
+
+@AddScrip => ()
+$AddScrips => undef
+$Stage => 'TransactionCreate'
+
+$MoveScripUp => undef
+$MoveScripDown => undef
+
</%ARGS>
diff --git a/rt/share/html/Admin/Elements/EditTemplates b/rt/share/html/Admin/Elements/EditTemplates
index 1c86a4e25..a5b64e1f7 100755
--- a/rt/share/html/Admin/Elements/EditTemplates
+++ b/rt/share/html/Admin/Elements/EditTemplates
@@ -58,6 +58,7 @@
<& /Elements/CollectionList,
OrderBy => 'id',
Order => 'ASC',
+ Rows => $Rows,
%ARGS,
DisplayFormat => '__CheckBox.{DeleteTemplates}__,'. $Format,
Format => $Format,
@@ -74,6 +75,7 @@
<%INIT>
$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Templates'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Templates'} || 50;
my $QueueObj = RT::Queue->new( $session{'CurrentUser'} );
$QueueObj->Load( $id ) if $id;
diff --git a/rt/share/html/Admin/Elements/EditUserComments b/rt/share/html/Admin/Elements/EditUserComments
deleted file mode 100755
index d0c6d62df..000000000
--- a/rt/share/html/Admin/Elements/EditUserComments
+++ /dev/null
@@ -1,56 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => "Comments about $name" &>
-<&|/l&>These comments aren't generally visible to the user</&>:<br />
-<input type="hidden" class="hidden" name="id" value="<%$id%>" />
-<textarea cols="60" rows="15" wrap="soft" name="Comments"><% $UserObj->Comments %></textarea>
-</form>
-
-<%ARGS>
-$UserObj => undef
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/ListGlobalScrips b/rt/share/html/Admin/Elements/LoggingSummary
index 3f97dbd12..a1b829942 100755..100644
--- a/rt/share/html/Admin/Elements/ListGlobalScrips
+++ b/rt/share/html/Admin/Elements/LoggingSummary
@@ -45,24 +45,48 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-% unless ( $Scrips->Count ) {
-<p><i><&|/l&>(No scrips)</&></i></p>
-% } else {
+<%init>
+my @summary;
-<& /Elements/CollectionList,
- OrderBy => 'Description',
- Order => 'ASC',
- Rows => 0,
- %ARGS,
- Format => $Format,
- Collection => $Scrips,
-&>
+if (my $level = RT->Config->Get("LogToSTDERR")) {
+ push @summary, loc("Logging [_1] level messages and higher to STDERR, which will usually end up in your webserver's error logs.", $level);
+}
-% }
+if (my $level = RT->Config->Get("LogToFile") and
+ my $logger = RT->Logger->output("file")) {
+ # Using the Log::Dispatch::File object let's us avoid duplicating
+ # filename logic from RT::InitLogging()
+ push @summary, loc("Logging [_1] level messages and higher to [_2]", $level, $logger->{filename});
+}
-<%init>
-my $Format = RT->Config->Get('AdminSearchResultFormat')->{'GlobalScrips'};
+if (my $level = RT->Config->Get("LogToSyslog")) {
+ my %conf = RT->Config->Get("LogToSyslogConf");
+ my $conf = join ", ", map { "$_=$conf{$_}" } keys %conf;
+ if ($conf) {
+ push @summary, loc("Logging [_1] level messages and higher to syslog with the following configuration: [_2]", $level, $conf);
+ } else {
+ push @summary, loc("Logging [_1] level messages and higher to syslog.", $level);
+ }
+}
-my $Scrips = RT::Scrips->new( $session{'CurrentUser'} );
-$Scrips->LimitToGlobal;
-</%INIT>
+if (my $level = RT->Config->Get("LogStackTraces")) {
+ push @summary, loc("Stack traces are added to message levels [_1] and higher.", $level);
+} else {
+ push @summary, loc("Stack traces are not logged.");
+}
+
+if (my $level = RT->Config->Get("StatementLog")) {
+ my $url = RT->Config->Get("WebPath") . "/Admin/Tools/Queries.html";
+ push @summary, \loc("SQL queries are logged at the [_1] level and also available in the [_2]query tool[_3].", $m->interp->apply_escapes($level, 'h'), qq[<strong><a href="$url">], '</a></strong>');
+} else {
+ push @summary, loc("SQL queries are not logged.");
+}
+</%init>
+<p>
+<&|/l&>RT's logging configuration is summarized below:</&>
+<ul>
+% for my $msg (@summary) {
+ <li><% ref($msg) ? $$msg : $m->interp->apply_escapes($msg, 'h') |n %></li>
+% }
+</ul>
+</p>
diff --git a/rt/share/html/Admin/Elements/MembershipsPage b/rt/share/html/Admin/Elements/MembershipsPage
new file mode 100644
index 000000000..e637e76cc
--- /dev/null
+++ b/rt/share/html/Admin/Elements/MembershipsPage
@@ -0,0 +1,152 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+%# <sales@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<& /Admin/Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
+<& /Elements/ListActions &>
+
+<form method="post" action="">
+<input type="hidden" id="<% $id %>" />
+
+<h2><&|/l&>Groups the principal is member of (check box to delete)</&></h2>
+
+<& /Elements/CollectionList,
+ OrderBy => 'Name',
+ Order => 'ASC',
+ %ARGS,
+ Rows => $Rows,
+ DisplayFormat => "__CheckBox.{Delete}__,$Format",
+ Format => $Format,
+ Collection => $is_member,
+ AllowSorting => 1,
+ PassArguments => [qw(Format Rows Page Order OrderBy id)],
+&>
+
+<h2><&|/l&>Groups the principal is not member of (check box to add)</&></h2>
+
+<& /Elements/CollectionList,
+ OrderBy => 'Name',
+ Order => 'ASC',
+ Rows => $Rows,
+ %ARGS,
+ DisplayFormat => "__CheckBox.{Add}__,'__HasMemberRecursively.{$id}__/TITLE:Recursive member',$Format",
+ Format => $Format,
+ Collection => $is_not_member,
+ AllowSorting => 1,
+ PassArguments => [qw(Format Rows Page Order OrderBy id)],
+&>
+
+<& /Elements/Submit, Label => loc('Update'), Name => 'Update' &>
+
+</form>
+
+<%INIT>
+my $principal = RT::Principal->new( $session{'CurrentUser'} );
+$principal->Load( $id ) || Abort(loc("Couldn't load principal #[_1]", $id));
+
+my $object = $principal->Object;
+$id = $object->id;
+
+if ( $Update ) {
+ my @results;
+ foreach my $gid( @Add ) {
+ my $group = RT::Group->new( $session{'CurrentUser'} );
+ $group->LoadUserDefinedGroup( $gid );
+ unless ( $group->id ) {
+ push @results, loc( "Couldn't load group #[_1]", $gid );
+ next;
+ }
+ my ($status, $msg) = $group->AddMember( $id );
+ push @results, $msg;
+ }
+ foreach my $gid( @Delete ) {
+ my $group = RT::Group->new( $session{'CurrentUser'} );
+ $group->LoadUserDefinedGroup( $gid );
+ unless ( $group->id ) {
+ push @results, loc( "Couldn't load group #[_1]", $gid );
+ next;
+ }
+ my ($status, $msg) = $group->DeleteMember( $id );
+ push @results, $msg;
+ }
+ MaybeRedirectForResults(
+ Arguments => { id => $id },
+ Actions => \@results,
+ );
+}
+
+my $is_member = RT::Groups->new( $session{'CurrentUser'} );
+$is_member->LimitToUserDefinedGroups;
+$is_member->WithMember( PrincipalId => $id );
+
+my $is_not_member = RT::Groups->new( $session{'CurrentUser'} );
+$is_not_member->LimitToUserDefinedGroups;
+$is_not_member->WithoutMember( PrincipalId => $id );
+$is_not_member->Limit( FIELD => 'id', OPERATOR => '!=', VALUE => $id );
+
+$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'};
+my $Rows = RT->Config->Get('AdminSearchResultRows')->{'Groups'} || 50;
+
+my $title;
+if ( $principal->IsUser ) {
+ $title = loc("Memberships of the user [_1]", $object->Name);
+} elsif ( $principal->IsGroup ) {
+ $title = loc("Memberships of the group [_1]", $object->Name);
+} else {
+ $title = loc("Memberships of the principal #[_1]", $id);
+}
+
+</%INIT>
+<%ARGS>
+$id => undef
+
+$Update => 0,
+@Add => (),
+@Delete => (),
+
+$Format => undef
+</%ARGS>
diff --git a/rt/share/html/Admin/Elements/ModifyTemplate b/rt/share/html/Admin/Elements/ModifyTemplate
index a30ae056c..7d738eb6d 100755
--- a/rt/share/html/Admin/Elements/ModifyTemplate
+++ b/rt/share/html/Admin/Elements/ModifyTemplate
@@ -48,7 +48,7 @@
<table>
<tr>
<td class="label"><&|/l&>Name</&>:</td>
-<td class="value"><input name="Name" value="<%$Name||''%>" size="20" /></td>
+<td class="value"><input name="Name" value="<%$Name||''%>" size="80" /></td>
</tr>
<tr>
<td class="label"><&|/l&>Description</&>:</td>
@@ -57,8 +57,13 @@
<tr>
<td class="label"><&|/l&>Type</&>:</td>
<td class="value">
-<input type="radio" name="Type" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>><&|/l&>Perl</&></input><br />
-<input type="radio" name="Type" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>><&|/l&>Simple</&></input><br />
+
+<input type="radio" name="Type" id="Type-Perl" value="Perl" <% $Type eq "Perl" ? 'checked="checked"' : "" |n %>></input>
+<label for="Type-Perl"><&|/l&>Perl</&></label><br />
+
+<input type="radio" name="Type" id="Type-Simple" value="Simple" <% $Type eq "Simple" ? 'checked="checked"' : "" |n %>>
+<label for="Type-Simple"><&|/l&>Simple</&></label><br />
+
</td>
</tr>
<tr>
diff --git a/rt/share/html/Admin/Elements/Portal b/rt/share/html/Admin/Elements/Portal
index 9207e1e97..3028524da 100644
--- a/rt/share/html/Admin/Elements/Portal
+++ b/rt/share/html/Admin/Elements/Portal
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<div id="rt-portal">
-<&| /Widgets/TitleBox, title => 'RT Portal' &>
+<&| /Widgets/TitleBox, title => loc('RT Portal') &>
<iframe src="https://bestpractical.com/rt/integration/news?utm_source=rt&utm_medium=iframe&utm_campaign=<%$RT::VERSION%>"></iframe>
</&>
</div>
diff --git a/rt/share/html/Admin/Elements/QueueRightsForUser b/rt/share/html/Admin/Elements/QueueRightsForUser
deleted file mode 100755
index 2dc99a295..000000000
--- a/rt/share/html/Admin/Elements/QueueRightsForUser
+++ /dev/null
@@ -1,64 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<ul>
-%while(my $ACE = $ACL->Next) {
-
-<li><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->RightName) %> (<%$ACE->UserObj->RealName%>)
-
-%}
-</ul>
-
-<%INIT>
-my $ACL = RT::ACL->new($session{'CurrentUser'});
-$ACL->LimitToQueue($QueueObj->id);
-$ACL->LimitPrincipalToUser($PrincipalId);
-</%INIT>
-<%ARGS>
-$PrincipalId => undef
-$QueueObj => undef
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectGroups b/rt/share/html/Admin/Elements/SelectGroups
index f45dca096..491a2fa21 100755
--- a/rt/share/html/Admin/Elements/SelectGroups
+++ b/rt/share/html/Admin/Elements/SelectGroups
@@ -53,7 +53,7 @@
<%INIT>
my $groups = RT::Groups->new($session{'CurrentUser'});
-$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain);
+$groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain, CASESENSITIVE => 0 );
</%INIT>
<%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectModifyGroup b/rt/share/html/Admin/Elements/SelectModifyGroup
deleted file mode 100755
index 29c924bdb..000000000
--- a/rt/share/html/Admin/Elements/SelectModifyGroup
+++ /dev/null
@@ -1,57 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-%while ( $Group = $Groups->Next) {
-<a href="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><br />
-%}
-<%INIT>
-my ($Group);
-my $Groups = RT::Groups->new($session{'CurrentUser'});
-$Groups->UnLimit;
-</%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectModifyQueue b/rt/share/html/Admin/Elements/SelectModifyQueue
deleted file mode 100755
index 81acc9e1b..000000000
--- a/rt/share/html/Admin/Elements/SelectModifyQueue
+++ /dev/null
@@ -1,57 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-%while ( $queue = $queues->Next) {
-<a href="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><br />
-%}
-<%INIT>
-my ($queue);
-my $queues = RT::Queues->new($session{'CurrentUser'});
-$queues->UnLimit;
-</%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectModifyUser b/rt/share/html/Admin/Elements/SelectModifyUser
deleted file mode 100755
index 442e0ca48..000000000
--- a/rt/share/html/Admin/Elements/SelectModifyUser
+++ /dev/null
@@ -1,73 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-%while ( $user = $users->Next) {
-<a href="Modify.html?id=<%$user->id%>"><%$user->id%>: <& /Elements/ShowUser, User => $user &></a><br />
-%}
-<%INIT>
-my ($user);
-my $users = RT::Users->new($session{'CurrentUser'});
-$users->Limit(FIELD => 'id',
- VALUE => RT->SystemUser->id,
- OPERATOR => '!=' );
-
-if (defined $IdLike) {
-$users->Limit(FIELD => 'Name',
- VALUE => $IdLike,
- OPERATOR => 'LIKE' );
-}
-if (defined $EmailLike) {
-$users->Limit(FIELD => 'EmailAddress',
- VALUE => $EmailLike,
- OPERATOR => 'LIKE');
-
-}
-</%INIT>
-<%ARGS>
-$IdLike => undef
-$EmailLike => undef
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectNewGroupMembers b/rt/share/html/Admin/Elements/SelectNewGroupMembers
index 8cdda89b4..07418b5d3 100755
--- a/rt/share/html/Admin/Elements/SelectNewGroupMembers
+++ b/rt/share/html/Admin/Elements/SelectNewGroupMembers
@@ -45,39 +45,43 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<table>
% if ( $Show ne 'Groups' ) {
-<label for="<% $Name %>Users"><&|/l&>Add user</&>:</label>
-<input type="text" value="" name="<% $Name %>Users" id="<% $Name %>Users" /><br />
+<tr>
+<td class="label"><label for="<% $Name %>Users"><&|/l&>Add user</&>:</label></td>
+<td>
+<input type="text" value="" name="<% $Name %>Users" id="<% $Name %>Users" data-autocomplete="Users" data-autocomplete-return="Name" data-autocomplete-privileged="1" data-autocomplete-exclude="<% $user_ids |n %>" />
<script type="text/javascript">
jQuery(function(){
- jQuery("#"+<% $Name |n,j%>+"Users").autocomplete({
- source: <% RT->Config->Get('WebPath') |n,j%>+"/Helpers/Autocomplete/Users?return=Name;privileged=1;exclude="+<% $user_ids |n,u,j %>,
- // Auto-submit once a user is chosen
- select: function( event, ui ) {
- jQuery(event.target).val(ui.item.value);
- jQuery(event.target).closest("form").submit();
- }
- }).addClass("autocompletes-user");
+ // Auto-submit once a user is chosen
+ jQuery("#"+<% $Name |n,j%>+"Users").on("autocompleteselect", function( event, ui ) {
+ jQuery(event.target).val(ui.item.value);
+ jQuery(event.target).closest("form").submit();
+ });
});
</script>
+</td>
+</tr>
% }
% if ( $Show ne 'Users' ) {
-<label for="<% $Name %>Groups"><&|/l&>Add group</&>:</label>
-<input type="text" value="" name="<% $Name %>Groups" id="<% $Name %>Groups" /><br />
+<tr>
+<td class="label"><label for="<% $Name %>Groups"><&|/l&>Add group</&>:</label></td>
+<td>
+<input type="text" value="" name="<% $Name %>Groups" id="<% $Name %>Groups" data-autocomplete="Groups" data-autocomplete-exclude="<% $group_ids |n %>" />
<script type="text/javascript">
jQuery(function(){
- jQuery("#"+<% $Name |n,j%>+"Groups").autocomplete({
- source: <% RT->Config->Get('WebPath') |n,j%>+"/Helpers/Autocomplete/Groups?exclude="+<% $group_ids |n,u,j %>,
- // Auto-submit once a user is chosen
- select: function( event, ui ) {
- jQuery(event.target).val(ui.item.value);
- jQuery(event.target).closest("form").submit();
- }
+ // Auto-submit once a group is chosen
+ jQuery("#"+<% $Name |n,j%>+"Groups").on("autocompleteselect", function( event, ui ) {
+ jQuery(event.target).val(ui.item.value);
+ jQuery(event.target).closest("form").submit();
});
});
</script>
+</td>
+</tr>
% }
+</table>
<%INIT>
my $user_ids = join(',', grep { $SkipUsers->{$_} } keys %$SkipUsers);
my $group_ids = join(',', grep { $SkipGroups->{$_} } keys %$SkipGroups);
diff --git a/rt/share/html/Admin/Elements/SelectRights b/rt/share/html/Admin/Elements/SelectRights
deleted file mode 100755
index df1f72412..000000000
--- a/rt/share/html/Admin/Elements/SelectRights
+++ /dev/null
@@ -1,120 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<input type="hidden" class="hidden" name="CheckACL" value="<%$ACLDesc%>" />
- <table border="0">
-<tr>
-<td valign="top" width="180" align="left">
-<%PERL>
-my %current_rights;
-my @pairs;
-while ( my $ace = $ACLObj->Next ) {
- my $right = $ace->RightName;
- $current_rights{ $right } = 1;
- push @pairs, [$right, loc($right)];
-}
-@pairs = sort { $a->[1] cmp $b->[1] } @pairs;
-</%PERL>
-<h3><&|/l&>Current rights</&></h3>
-% unless ( @pairs ) {
-<i><&|/l&>No rights granted.</&></i> <br />
-% } else {
-<i>(<&|/l&>Check box to revoke right</&>)</i><br />
-% foreach my $pair ( @pairs ) {
-<input type="checkbox" class="checkbox" value="<% $pair->[0] %>" name="RevokeRight-<% $ACLDesc %>" />&nbsp;<% $pair->[1] %><br />
-% } }
-</td>
-<td valign="top">
-<h3><&|/l&>New rights</&></h3>
-<select size="5" multiple="multiple" name="GrantRight-<%$ACLDesc%>">
-% foreach my $pair (sort { $a->[1] cmp $b->[1] } map [$_, loc($_)], grep !$current_rights{$_}, keys %Rights) {
- <option value="<% $pair->[0] %>" title="<% loc($Rights{$pair->[0]}) %>"><% $pair->[1] %></option>
-% }
-<option value="" selected="selected"><&|/l&>(no value)</&></option>
-</select>
-</td>
-</tr>
-</table>
-<%INIT>
- my ($ACLDesc, $AppliesTo, %Rights);
-
- # if the principal id points to a user, we really want to point
- # to their ACL equivalence group. The machinations we're going through
- # lead me to start to suspect that we really want users and groups
- # to just be the same table. or _maybe_ that we want an object db.
- my $princ = RT::Principal->new($RT::SystemUser);
- $princ->Load($PrincipalId);
- if ($princ->PrincipalType eq 'User') {
- my $group = RT::Group->new($RT::SystemUser);
- $group->LoadACLEquivalenceGroup($princ);
- $PrincipalId = $group->PrincipalId;
- }
-
-
- my $ACLObj = RT::ACL->new($session{'CurrentUser'});
- my $ACE = RT::ACE->new($session{'CurrentUser'});
-
-
- $ACLObj->LimitToObject( $Object);
- $ACLObj->LimitToPrincipal( Id => $PrincipalId);
- $ACLObj->OrderBy(FIELD=>'RightName');
-
- eval {
- %Rights = %{$Object->AvailableRights};
- };
- if ($@) {
- %Rights = ( loc('System Error') => loc("No rights found") );
- }
-
- $ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id;
-</%INIT>
-
-<%ARGS>
-$PrincipalType => undef
-$PrincipalId => undef
-$Object =>undef
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectScrip b/rt/share/html/Admin/Elements/SelectScrip
deleted file mode 100755
index e55804a26..000000000
--- a/rt/share/html/Admin/Elements/SelectScrip
+++ /dev/null
@@ -1,72 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
-<option value=""
-<% $Default eq undef && qq[ selected="selected"] |n %>
->-</option>
-%while (my $Scrip = $Scrips->Next) {
-<option value="<% $Scrip->Id %>"
-<% $Scrip->Id == $Default && qq[ selected="selected"] |n %>
-><% loc($Scrip->Name) %>
-</option>
-%}
-</select>
-
-<%INIT>
-my $Scrips = RT::Scrips->new($session{'CurrentUser'});
-$Scrips->UnLimit;
-
-
-
-</%INIT>
-<%ARGS>
-
-$Default => undef
-$Name => 'Scrip'
-
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectSingleOrMultiple b/rt/share/html/Admin/Elements/SelectSingleOrMultiple
deleted file mode 100755
index d6909b8c2..000000000
--- a/rt/share/html/Admin/Elements/SelectSingleOrMultiple
+++ /dev/null
@@ -1,67 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
- <select name="<%$Name%>">
- <option value="1" <%$SingleDefault|n%>><&|/l&>Single</&></option>
- <option value="0" <%$MultipleDefault|n%>><&|/l&>Multiple</&></option>
- </select>
-
-
-<%INIT>
-my ($SingleDefault, $MultipleDefault);
-if ($Default == 1) {
- $SingleDefault = qq[ selected="selected"];
-}
-elsif ($Default == 0 ) {
- $MultipleDefault = qq[ selected="selected"];
-}
-
-</%INIT>
-<%ARGS>
-$Name => 'Single'
-$Default => 1
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/SelectStage b/rt/share/html/Admin/Elements/SelectStage
index 32d39c786..03260b139 100644
--- a/rt/share/html/Admin/Elements/SelectStage
+++ b/rt/share/html/Admin/Elements/SelectStage
@@ -46,28 +46,20 @@
%#
%# END BPS TAGGED BLOCK }}}
<select name="<%$Name%>">
-% foreach my $stage (@stages) {
-
-%# allow [stage, display] in place of a scalar stage name
-% my ($value, $display) = ref($stage) ? @$stage : ($stage, $stage);
-
+% foreach my $value (@stages) {
<option value="<%$value%>"
<% ($value eq $Default) && qq[ selected="selected"] |n %>
-><% loc($display) %>
+<% ($value eq 'TransactionBatch' and not RT->Config->Get('UseTransactionBatch')) && qq[ disabled ] %>
+><% loc( RT::Scrip->FriendlyStage($value) ) %>
</option>
% }
+</select>
<%INIT>
if ( !defined $Default || $Default eq '') {
$Default = 'TransactionCreate';
}
-my @stages = 'TransactionCreate';
-
-push @stages, RT->Config->Get('UseTransactionBatch')
- ? 'TransactionBatch'
- : ['TransactionBatch', 'TransactionBatch (DISABLED)'];
-
-push @stages, 'Disabled';
+my @stages = ('TransactionCreate', 'TransactionBatch');
</%INIT>
<%ARGS>
$Default => 'TransactionCreate'
diff --git a/rt/share/html/Admin/Elements/CreateUserCalled b/rt/share/html/Admin/Elements/SelectStageForAdded
index fb15893f0..7d8747060 100755..100644
--- a/rt/share/html/Admin/Elements/CreateUserCalled
+++ b/rt/share/html/Admin/Elements/SelectStageForAdded
@@ -45,6 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form method="get" action="<% RT->Config->Get('WebPath') %>/Admin/Users/Create.html">
-<&|/l&>New user called</&> <input name="Name" size="10" /><input type="submit" class="button" value="<&|/l&>Create</&>" />
-</form>
+<div style="text-align:right">
+<% $Label %>
+<& SelectStage, %ARGS &>
+</div>
+<%args>
+$Label => loc('Select scrip stage for newly added queues:')
+</%args>
diff --git a/rt/share/html/Admin/Elements/SelectTemplate b/rt/share/html/Admin/Elements/SelectTemplate
deleted file mode 100755
index 02b78405a..000000000
--- a/rt/share/html/Admin/Elements/SelectTemplate
+++ /dev/null
@@ -1,77 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
-%# <sales@bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>">
-<option value=""
-<% defined($Default) && $Default eq 'none' && qq[ selected="selected"] |n %>>-</option>
-%while (my $Template = $PrimaryTemplates->Next) {
-<option value="<%$Template->Id%>" <% ($Template->Id == $Default) && qq[ selected="selected"] |n %>><% loc($Template->Name) %></option>
-%}
-%while (my $Template = $OtherTemplates->Next) {
-<option value="<%$Template->Id%>" <% defined($Default) && ($Template->Id == $Default) && qq[ selected="selected"] |n %>><&|/l, loc($Template->Name) &>Global template: [_1]</&></option>
-%}
-</select>
-
-<%INIT>
-
-
-my $PrimaryTemplates = RT::Templates->new($session{'CurrentUser'});
-if ($Queue != 0) {
-$PrimaryTemplates->LimitToQueue($Queue);
-$PrimaryTemplates->OrderBy(FIELD => 'Name');
-}
-
-my $OtherTemplates = RT::Templates->new($session{'CurrentUser'});
-$OtherTemplates->LimitToGlobal;
-$OtherTemplates->OrderBy(FIELD => 'Name');
-
-</%INIT>
-<%ARGS>
-$Queue => undef
-$Default => 'none'
-$Name => 'Template'
-</%ARGS>
diff --git a/rt/share/html/Admin/Elements/ShowKeyInfo b/rt/share/html/Admin/Elements/ShowKeyInfo
index 0a7ef0f02..035125957 100644
--- a/rt/share/html/Admin/Elements/ShowKeyInfo
+++ b/rt/share/html/Admin/Elements/ShowKeyInfo
@@ -45,18 +45,29 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<&| /Widgets/TitleBox, title => $title &>
-% if ( $res{'exit_code'} || !keys %{ $res{'info'} } ) {
-<% loc('No keys for this address') %>
+<&| /Widgets/TitleBox, title => $title &><table>
+% while ( my $protocol = shift @protocols ) {
+% my %res = RT::Crypt->GetKeyInfo(
+% Protocol => $protocol,
+% Key => $EmailAddress,
+% Type => $Type,
+% );
+% if ( $res{'exit_code'} ) {
+<tr><th colspan="2"><% loc("Couldn't get [_1] keys information", $protocol) %></th></tr>
+% } elsif ( !keys %{ $res{'info'} } ) {
+<tr><th colspan="2"><% loc('No [_1] keys for this address', $protocol) %></th></tr>
% } else {
-<table>
-% unless ( $Type eq 'private' ) {
+<tr><th colspan="2"><% loc("[_1] key '[_2]'", $protocol, $res{'info'}{'Formatted'} ) %></th></tr>
+
+% if ( $Type ne 'private' && $res{'info'}{'Trust'} ) {
<tr><th class="label"><% loc('Trust') %>:</th> <td><% loc( $res{'info'}{'Trust'} ) %></td></tr>
% }
<tr><th class="label"><% loc('Fingerprint') %>:</th>
<td><% $res{'info'}{'Fingerprint'} %></td></tr>
+
+% $_->CurrentUser( $session{CurrentUser} ) for grep {$_} (@{$res{'info'}}{qw|Created Expire|});
<tr><th class="label"><% loc('Created') %>:</th>
<td><% $res{'info'}{'Created'}? $res{'info'}{'Created'}->AsString( Time => 0 ): loc('never') %></td></tr>
@@ -64,30 +75,38 @@
<td><% $res{'info'}{'Expire'}? $res{'info'}{'Expire'}->AsString( Time => 0 ): loc('never') %></td></tr>
% foreach my $uinfo( @{ $res{'info'}{'User'} } ) {
+% if ($uinfo->{'Created'} or $uinfo->{'Expire'}) {
+% $_->CurrentUser( $session{CurrentUser} ) for grep {$_} ($uinfo->{'Created'}, $uinfo->{'Expire'});
<tr><th class="label"><% loc('User (created - expire)') %>:</th>
-<td><% $uinfo->{'String'} %>\
+<td><% $uinfo->{'String'} %> \
(<% $uinfo->{'Created'}? $uinfo->{'Created'}->AsString( Time => 0 ): loc('never') %> - \
-<% $uinfo->{'Expire'}? $uinfo->{'Expire'}->AsString( Time => 0 ): loc('never') %>)
-</td></tr>
+<% $uinfo->{'Expire'}? $uinfo->{'Expire'}->AsString( Time => 0 ): loc('never') %>)</td></tr>
+% } else {
+<tr><th class="label"><% loc('User') %>:</th>
+<td><% $uinfo->{'String'} %></td></tr>
+% }
% }
-</table>
% }
-</&>
+
+% if ( @protocols ) {
+<tr><th colspan="2">&nbsp;</th></tr>
+% }
+
+% }
+</table></&>
<%ARGS>
$EmailAddress
$Type => 'public'
</%ARGS>
<%INIT>
-require RT::Crypt::GnuPG;
-my %res = RT::Crypt::GnuPG::GetKeyInfo( $EmailAddress, $Type );
+my @protocols = RT::Crypt->EnabledProtocols;
my $title;
unless ( $Type eq 'private' ) {
- $title = loc('GnuPG public key(s) for [_1]', $EmailAddress);
+ $title = loc('Public key(s) for [_1]', $EmailAddress);
} else {
- $title = loc('GnuPG private key(s) for [_1]', $EmailAddress);
+ $title = loc('Private key(s) for [_1]', $EmailAddress);
}
-
</%INIT>
diff --git a/rt/share/html/Admin/Elements/PickObjects b/rt/share/html/Admin/Elements/UpgradeHistory
index 6ab014c52..ccdc8f5a3 100644
--- a/rt/share/html/Admin/Elements/PickObjects
+++ b/rt/share/html/Admin/Elements/UpgradeHistory
@@ -45,37 +45,27 @@
%# 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>
-% my $id = "Object-".$Object->id."-CF-".$id;
-% if (!$ReadOnly) {
- <td valign="top">
-<input type="checkbox" id="<% $id %>" name="<% $id %>" value="1" <% $Checked ? 'checked="checked"' : ''%>
-/>
- </td>
-% }
- <td valign="top">
- <label for="<% $id %>">
-% if ($Object->Name) {
- <b><%$Object->Name%></b><br />
-% } else {
- <i>(<%loc("no name")%>)</i><br />
-% }
- <%$Object->can('Description') ? ($Object->Description||'') : '' %>
- </label>
- </td>
-</tr>
+% for my $package (@packages) {
+% my ($version_status, @lines) = RT->System->ParsedUpgradeHistory($package);
+<h4><% $package %> (<% $version_status %>)</h4>
+<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection upgrade-history">
+<thead>
+<tr class="collection-as-table">
+<th class="collection-as-table">&nbsp;</th>
+<th class="collection-as-table"><&|/l&>Action</&></th>
+<th class="collection-as-table"><&|/l&>Date</&></th>
+<th class="collection-as-table"><&|/l&>Elapsed</&></th>
+<th class="collection-as-table"><&|/l, $package &>[_1] Version</&></th>
+</tr></thead>
+
+% my $i = 0;
+% for my $upgrade (@lines) {
+<& UpgradeHistoryRow, i => \$i, row => $upgrade &>
% }
</table>
% }
-<%ARGS>
-@Objects
-$id
-$ReadOnly => 0
-$Checked => 0
-</%ARGS>
+
+<%init>
+my $upgrade_history = RT->System->UpgradeHistory;
+my @packages = ('RT', sort grep { $_ ne 'RT' } keys %$upgrade_history);
+</%init>
diff --git a/rt/share/html/Admin/Elements/PickCustomFields b/rt/share/html/Admin/Elements/UpgradeHistoryRow
index 5a90d139a..dc5374126 100644
--- a/rt/share/html/Admin/Elements/PickCustomFields
+++ b/rt/share/html/Admin/Elements/UpgradeHistoryRow
@@ -45,54 +45,54 @@
%# 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" class="checkbox" name="Object-<%$id%>-CF-<%$CustomFieldObj->Id%>" value="1" <% $Checked ? 'checked="checked"' : '' %>
-/>
- </td>
-% }
- <td valign="top">
- <a href="<% RT->Config->Get('WebPath') %>/Admin/CustomFields/Modify.html?id=<%$CustomFieldObj->id()%>">
-% if ($CustomFieldObj->Name) {
-<b><%$CustomFieldObj->Name%></b>
-% } else {
-<i>(<&|/l&>no name</&>)</i>
+<tr class="<% join ' ', map {CSSClass($_)} @classes %>">
+ <td class="upgrade-history-parent" id="parent-upgrade-history-<% $row->{individual_id} %>">
+% if ($top) {
+ <span class="widget"><a href="#" onclick="toggle_upgrade_history(this, '.upgrade-history-' + <% $row->{full_id} | n,j %>); return false";"></a></span>
% }
-</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->Config->Get('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->Config->Get('WebPath')%><% $m->request_comp->path |n %>?id=<%$id%>&SubType=<%$SubType%>&CustomField=<%$CustomFieldObj->id%>&Move=1"><&|/l&>Move down</&></a>]
-% }
- </td>
+ </td>
+ <td class="collection-as-table" style="padding-left: <% $indent * 3%>em">
+% if ($row->{'action'} eq 'upgrade') { # type is more specific for upgrades
+<&|/l, $row->{'from'}, $row->{'to'} &>Upgrade from [_1] to [_2]</&>
+% } elsif ( $row->{'action'} eq 'insert' ) {
+<&|/l, $row->{filename} &>Insert from [_1]</&>
+% } elsif ( $row->{'action'} eq 'schema' ) {
+<&|/l, $row->{filename} &>Schema updates from [_1]</&>
+% } elsif ( $row->{'action'} eq 'acl' ) {
+<&|/l, $row->{filename} &>ACL updates from [_1]</&>
+% } elsif ( $row->{'action'} eq 'indexes' ) {
+<&|/l, $row->{filename} &>Index updates from [_1]</&>
+% } else {
+<% ucfirst($row->{action}) %>
+% }
+% if (not $complete) {
+ <&|/l&>(Incomplete)</&>
+% }
+ </td>
+ <td class="collection-as-table"><% $timestamp->AsString %></td>
+ <td class="collection-as-table"><% $duration %></td>
+ <td class="collection-as-table"><% $row->{ext_version} || $row->{rt_version} %></td>
</tr>
+% for (@{$kids || []}) {
+<& UpgradeHistoryRow, row => $_, indent => $indent+1, i => $i &>
% }
-</table>
-% }
-<%ARGS>
-@CustomFields
-$id
-$ReadOnly => 0
-$Checked => 0
-$SubType
-</%ARGS>
+<%args>
+$indent => 0
+$i
+$row
+</%args>
+<%init>
+my $complete = $row->{return_value} ? $row->{return_value}[0] : $row->{end};
+my $kids = $row->{sub_events};
+my $top = $row->{full_id} eq $row->{individual_id};
+
+my @classes;
+push @classes, $complete ? 'complete' : 'incomplete';
+push @classes, $$i++ % 2 ? 'oddline' : 'evenline';
+push @classes, 'upgrade-history-'.$row->{full_id} unless $top;
+
+my $timestamp = RT::Date->new($session{CurrentUser});
+$timestamp->Set(Value => $row->{timestamp});
+
+my $duration = $row->{end} ? $timestamp->DurationAsString($row->{end} - $row->{timestamp}) : '';
+</%init>