summaryrefslogtreecommitdiff
path: root/rt/share/html
diff options
context:
space:
mode:
authorivan <ivan>2011-04-18 23:15:19 +0000
committerivan <ivan>2011-04-18 23:15:19 +0000
commit75162bb14b3e38d66617077843f4dfdcaf09d5c4 (patch)
treed89dd49a476cf2f0859ed6a0adc2992ea6d69d04 /rt/share/html
parentfc6209f398899f0211cfcedeb81a3cd65e04a941 (diff)
import rt 3.8.10
Diffstat (limited to 'rt/share/html')
-rwxr-xr-xrt/share/html/Admin/Elements/EditCustomFields12
-rw-r--r--rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp2
-rwxr-xr-xrt/share/html/Elements/Header3
-rw-r--r--rt/share/html/Install/index.html2
-rwxr-xr-xrt/share/html/NoAuth/Logout.html3
-rw-r--r--rt/share/html/NoAuth/RichText/autohandler56
-rw-r--r--rt/share/html/NoAuth/css/dhandler2
-rw-r--r--rt/share/html/Search/Chart3
-rw-r--r--rt/share/html/Search/Elements/Chart2
-rw-r--r--rt/share/html/Search/Elements/SelectPersonType2
-rwxr-xr-xrt/share/html/Ticket/Elements/EditCustomFields5
-rw-r--r--rt/share/html/Tools/Reports/ResolvedByDates.html2
-rw-r--r--rt/share/html/Tools/Reports/ResolvedByOwner.html2
13 files changed, 81 insertions, 15 deletions
diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields
index bf65c9e..91d5cff 100755
--- a/rt/share/html/Admin/Elements/EditCustomFields
+++ b/rt/share/html/Admin/Elements/EditCustomFields
@@ -59,10 +59,7 @@
Rows => 0,
Page => 1,
Format => $format,
- DisplayFormat =>
- $id
- ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
- : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'"),
+ DisplayFormat => $display_format,
AllowSorting => 0,
ShowEmpty => 0,
PassArguments => [
@@ -151,6 +148,8 @@ 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);
@@ -162,6 +161,11 @@ $not_applied_cfs->LimitToNotApplied( $id ? ($id, 0) : (0) );
my $format = RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
+my $display_format = $id
+ ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
+ : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'");
+$m->callback(CallbackName => 'EditDisplayFormat', DisplayFormat => \$display_format, id => $id);
+
</%INIT>
<%ARGS>
$Object
diff --git a/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp
index 18c3fd3..daaa6b7 100644
--- a/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp
+++ b/rt/share/html/Admin/Tools/Shredder/Elements/PluginHelp
@@ -65,7 +65,7 @@ unless( $file ) {
use RT::Shredder::POD qw();
my $text = '';
-open my $io_handle, ">:scalar", \$text or die "Can't open scalar for write: $!";
+open( my $io_handle, ">:scalar", \$text ) or die "Can't open scalar for write: $!";
RT::Shredder::POD::plugin_html( $file, $io_handle );
if ( $Plugin eq 'Base' ) {
$file =~ s/\.pm$/\/Search.pm/;
diff --git a/rt/share/html/Elements/Header b/rt/share/html/Elements/Header
index ac9683d..f9bd27f 100755
--- a/rt/share/html/Elements/Header
+++ b/rt/share/html/Elements/Header
@@ -54,7 +54,8 @@
% if ($Refresh && $Refresh =~ /^(\d+)/ && $1 > 0) {
- <meta http-equiv="refresh" content="<% $Refresh %>" />
+% my $URL = $m->notes->{LogoutURL}; $URL = $URL ? ";URL=$URL" : "";
+ <meta http-equiv="refresh" content="<% "$1$URL" %>" />
% }
<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>/favicon.png" type="image/png" />
diff --git a/rt/share/html/Install/index.html b/rt/share/html/Install/index.html
index 1c08c73..bc9573b 100644
--- a/rt/share/html/Install/index.html
+++ b/rt/share/html/Install/index.html
@@ -95,7 +95,7 @@ my $file = File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' );
if ( ! -e $file ) {
# write a blank RT_SiteConfig.pm
- open my $fh, '>', $file or die $!;
+ open( my $fh, '>', $file ) or die $!;
close $fh;
}
elsif ( ! -w $file ) {
diff --git a/rt/share/html/NoAuth/Logout.html b/rt/share/html/NoAuth/Logout.html
index 103ae4f..fa21100 100755
--- a/rt/share/html/NoAuth/Logout.html
+++ b/rt/share/html/NoAuth/Logout.html
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc('Logout'), Refresh => RT->Config->Get('LogoutRefresh').";URL=$URL" &>
+<& /Elements/Header, Title => loc('Logout'), Refresh => RT->Config->Get('LogoutRefresh') &>
</div>
<div id="body" class="login-body">
@@ -81,4 +81,5 @@ if (keys %session) {
}
$m->callback( %ARGS, CallbackName => 'AfterSessionDelete' );
+$m->notes->{LogoutURL} = $URL;
</%INIT>
diff --git a/rt/share/html/NoAuth/RichText/autohandler b/rt/share/html/NoAuth/RichText/autohandler
new file mode 100644
index 0000000..fd48b59
--- /dev/null
+++ b/rt/share/html/NoAuth/RichText/autohandler
@@ -0,0 +1,56 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2011 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 }}}
+<%init>
+my $file = $m->base_comp->source_file;
+if ($file =~ m{RichText/+FCKeditor}) {
+ $RT::Logger->crit("Invalid request directly to the rich text editor: $file");
+ $m->abort(403);
+} else {
+ $m->call_next();
+}
+</%init>
diff --git a/rt/share/html/NoAuth/css/dhandler b/rt/share/html/NoAuth/css/dhandler
index a72385f..2472a9f 100644
--- a/rt/share/html/NoAuth/css/dhandler
+++ b/rt/share/html/NoAuth/css/dhandler
@@ -70,7 +70,7 @@ sub file_handle {
my $self = shift;
my $file = shift;
my $content = $self->{'mason'}->scomp($file) || '';
- open my $fh, '<', \$content or die "$!";
+ open( my $fh, '<', \$content ) or die "$!";
return $fh;
}
diff --git a/rt/share/html/Search/Chart b/rt/share/html/Search/Chart
index 429fea5..7bcb8d0 100644
--- a/rt/share/html/Search/Chart
+++ b/rt/share/html/Search/Chart
@@ -66,7 +66,8 @@ if ($ChartStyle eq 'pie') {
use RT::Report::Tickets;
my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} );
-
+my %AllowedGroupings = reverse $tix->Groupings( Query => $Query );
+$PrimaryGroupBy = 'Queue' unless exists $AllowedGroupings{$PrimaryGroupBy};
my ($count_name, $value_name) = $tix->SetupGroupings(
Query => $Query, GroupBy => $PrimaryGroupBy,
);
diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart
index b74aba4..e25a9ef 100644
--- a/rt/share/html/Search/Elements/Chart
+++ b/rt/share/html/Search/Elements/Chart
@@ -56,6 +56,8 @@ use RT::Report::Tickets;
$PrimaryGroupBy ||= 'Queue'; # make sure PrimaryGroupBy is not undef
my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} );
+my %AllowedGroupings = reverse $tix->Groupings( Query => $Query );
+$PrimaryGroupBy = 'Queue' unless exists $AllowedGroupings{$PrimaryGroupBy};
my ($count_name, $value_name) = $tix->SetupGroupings(
Query => $Query, GroupBy => $PrimaryGroupBy,
);
diff --git a/rt/share/html/Search/Elements/SelectPersonType b/rt/share/html/Search/Elements/SelectPersonType
index 2d20973..6454acf 100644
--- a/rt/share/html/Search/Elements/SelectPersonType
+++ b/rt/share/html/Search/Elements/SelectPersonType
@@ -72,7 +72,7 @@ else {
@types = qw(Requestor Cc AdminCc Watcher Owner QueueCc QueueAdminCc QueueWatcher);
}
-my @subtypes = qw(EmailAddress Name RealName Nickname Organization Address1 Address2 WorkPhone HomePhone MobilePhone PagerPhone id);
+my @subtypes = @{ $RT::Tickets::SEARCHABLE_SUBFIELDS{'User'} };
</%INIT>
<%ARGS>
diff --git a/rt/share/html/Ticket/Elements/EditCustomFields b/rt/share/html/Ticket/Elements/EditCustomFields
index 6cab8be..918f4d4 100755
--- a/rt/share/html/Ticket/Elements/EditCustomFields
+++ b/rt/share/html/Ticket/Elements/EditCustomFields
@@ -57,11 +57,11 @@
% if ( $single_column || $i % 2 ) {
<tr class="edit-custom-field">
% }
- <td class="cflabel cftype-<% $type %> cfname-<% $escaped_name %>" id="cflabel-<% $CustomField->Id %>" >
+ <td class="cflabel cftype-<% $type %> cfname-<% $escaped_name %>" id="<% $CFIDPrefix %>cflabel-<% $CustomField->Id %>" >
<b><% loc($CustomField->Name) %></b><br />
<i><% $CustomField->FriendlyType %></i>
</td>
- <td class="entry cftype-<% $type %> cfname-<% $escaped_name %>" id="cfentry-<% $CustomField->Id %>">
+ <td class="entry cftype-<% $type %> cfname-<% $escaped_name %>" id="<% $CFIDPrefix %>cfentry-<% $CustomField->Id %>">
% my $default = $m->notes('Field-' . $CustomField->Id);
% $default ||= $ARGS{"CustomField-". $CustomField->Id };
<& /Elements/EditCustomField,
@@ -112,4 +112,5 @@ $TicketObj => undef
$QueueObj => undef
$OnCreate => undef
$DefaultsFromTopArguments => 1
+$CFIDPrefix => ''
</%ARGS>
diff --git a/rt/share/html/Tools/Reports/ResolvedByDates.html b/rt/share/html/Tools/Reports/ResolvedByDates.html
index 4f833ac..c23e238 100644
--- a/rt/share/html/Tools/Reports/ResolvedByDates.html
+++ b/rt/share/html/Tools/Reports/ResolvedByDates.html
@@ -79,7 +79,7 @@ $q->LoadByCols(Name => $Queue);
% if ($Queue) { $query .= " AND Queue = '$Queue'"}
% if ($ResolvedBefore) { $query .= " AND Resolved < '".$before->ISO(Timezone => 'user')."'"; }
% if ($ResolvedAfter) { $query .= " AND Resolved > '".$after->ISO(Timezone => 'user')."'"}
-% my $groupby = 'Owner';
+% my $groupby = 'Owner.Name';
<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
% }
diff --git a/rt/share/html/Tools/Reports/ResolvedByOwner.html b/rt/share/html/Tools/Reports/ResolvedByOwner.html
index 6638388..d41f503 100644
--- a/rt/share/html/Tools/Reports/ResolvedByOwner.html
+++ b/rt/share/html/Tools/Reports/ResolvedByOwner.html
@@ -59,7 +59,7 @@ $q->LoadByCols(Name => $Queue);
% if ($Queue) {
% # if we have a queue, do the search
% my $query = "Status = 'resolved' AND Queue = '$Queue'";
-% my $groupby = 'Owner';
+% my $groupby = 'Owner.Name';
<& /Search/Elements/Chart, Query => $query, PrimaryGroupBy => $groupby &>
% }