summaryrefslogtreecommitdiff
path: root/rt/share/html/m
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/m')
-rw-r--r--rt/share/html/m/_elements/footer2
-rw-r--r--rt/share/html/m/_elements/header8
-rw-r--r--rt/share/html/m/_elements/login9
-rw-r--r--rt/share/html/m/_elements/raw_style500
-rw-r--r--rt/share/html/m/_elements/ticket_list6
-rw-r--r--rt/share/html/m/style.css52
-rw-r--r--rt/share/html/m/ticket/create82
-rw-r--r--rt/share/html/m/ticket/history2
-rw-r--r--rt/share/html/m/ticket/reply19
-rw-r--r--rt/share/html/m/ticket/show57
-rw-r--r--rt/share/html/m/tickets/search19
11 files changed, 89 insertions, 667 deletions
diff --git a/rt/share/html/m/_elements/footer b/rt/share/html/m/_elements/footer
index b7fb283..286a79d 100644
--- a/rt/share/html/m/_elements/footer
+++ b/rt/share/html/m/_elements/footer
@@ -48,7 +48,7 @@
<& /Elements/Logo, ShowName => 1, OnlyCustom => 1 &>
<div id="bpscredits">
<div id="copyright">
-<&|/l_unsafe, '', '', '2014', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
+<&|/l_unsafe, '', '', '2015', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
</div>
</div>
</body>
diff --git a/rt/share/html/m/_elements/header b/rt/share/html/m/_elements/header
index a9fda94..f602e83 100644
--- a/rt/share/html/m/_elements/header
+++ b/rt/share/html/m/_elements/header
@@ -55,12 +55,12 @@ $r->headers_out->{'Cache-control'} = 'no-cache';
</%init>
<html>
<head>
-<& /Elements/Framekiller &>
-<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')|n%>/m/style.css"/>
+<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')%>/static/css/mobile.css"/>
<title><%$title%></title>
-% my ($jquery) = grep { /^jquery-\d+\./ } RT->Config->Get('JSFiles');
-<script src="<% RT->Config->Get('WebPath') %>/NoAuth/js/<% $jquery %>"></script>
+% my ($jquery) = grep { /^jquery-\d+\./ } RT::Interface::Web->JSFiles;
+<script src="<% RT->Config->Get('WebPath') %>/static/js/<% $jquery %>"></script>
<meta name="viewport" content="width=device-width height=device-height user-scalable=yes"/>
+<& /Elements/Framekiller &>
</head>
<body>
% if ($show_home_button) {
diff --git a/rt/share/html/m/_elements/login b/rt/share/html/m/_elements/login
index ce524ee..b87aa56 100644
--- a/rt/share/html/m/_elements/login
+++ b/rt/share/html/m/_elements/login
@@ -46,11 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% $m->callback( %ARGS, CallbackName => 'Header' );
-<&| /m/_elements/wrapper, show_home_button => 0 &>
-<style>
-<& /m/_elements/raw_style &>
-</style>
-<h1><&|/l, RT->Config->Get('rtname') &>RT for [_1]</&></h1>
+<&| /m/_elements/wrapper, title => loc('RT for [_1]', RT->Config->Get('rtname')), show_home_button => 0 &>
<div id="body" class="login-body">
<& /Elements/ListActions,
@@ -66,7 +62,7 @@
<& /Elements/LoginRedirectWarning, %ARGS &>
-% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
+% unless (RT->Config->Get('WebRemoteUserAuth') and !RT->Config->Get('WebFallbackToRTLogin')) {
<form id="login" name="login" method="post" action="<% RT->Config->Get("WebPath") %>/NoAuth/Login.html">
<div class="entry">
@@ -96,6 +92,7 @@ if (window.location.hash) {
</form>
% }
</&>
+<& /Elements/LoginHelp &>
</div><!-- #login-box -->
% $m->callback( %ARGS, CallbackName => 'AfterForm' );
diff --git a/rt/share/html/m/_elements/raw_style b/rt/share/html/m/_elements/raw_style
deleted file mode 100644
index f8fee32..0000000
--- a/rt/share/html/m/_elements/raw_style
+++ /dev/null
@@ -1,500 +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 }}}
-body {
- font-family: helvetica, arial, sans-serif;
- background-color: #ccf;
- margin: 0;
-}
-
-h1 {
- font-size: 1.2em;
- padding-top: 0.5em;
- padding-left: 0.2em;
- display: block;
- background-color: #fff;
- margin: 0;
-}
-
-div.buttons {
- text-align: right;
- padding-right: 0.5em;
- padding-bottom: 0.5em;
-}
-
-.titlebox-title {
- font-size: 1.1em;
- margin-left: 0.5em;
- margin-top: -1.2em;
- top: -0.5em;
- padding: 0.5em;
- position: relative;
- display: inline-block;
- text-decoration: none;
- background-color: #fff;
- -moz-border-radius: 0.25em;
- -webkit-border-radius: 0.25em;
- border-radius: 0.25em;
- -webkit-box-shadow: #333 0px 0px 5px;
- -moz-box-shadow: #333 0px 0px 5px;
- box-shadow: #333 0px 0px 5px;
-}
-
-ul.menu
-{
- text-align: left;
- list-style: none;
- padding: 0;
- margin: -0.6em;
- left: 0;
-}
-
-ul.menu li
-{
- display: block;
- margin: 0;
- padding: 0;
- font-weight: bold;
-}
-
-ul.ticketlist li:active, ul.ticketlist li:hover,
-ul.menu li:active, ul.menu li:hover {
- background-color: #eee;
-}
-
-
-ul.menu li
-{
- display: block;
- padding: 1em;
- margin: 0;
- border:0;
- border-top-width: 1px;
- border-top-color: #666;
- border-style: solid;
- text-decoration: none;
-}
-
-ul.menu li:first-child{
- border: none;
-}
-
-ul.menu li#active a
-{
- color: #800000;
-}
-
-div.titlebox, #bpscredits, #logo, .ticket_menu{
- -moz-border-radius: 1em;
- -webkit-border-radius: 1em;
- border-radius: 1em;
- margin: 0.5em;
- background-color: #fff;
- padding-top: 1em;
- padding-bottom: 0.8em;
- margin-top: 1.25em;
- -webkit-box-shadow: #333 0px 0px 5px;
- -moz-box-shadow: #333 0px 0px 5px;
- box-shadow: #333 0px 0px 5px;
- margin-bottom: 1em;
-}
-
-div .titlebox-content {
- padding-left: 0.5em;
- padding-right: 0.5em;
-}
-
-hr.clear {
- display: none;
-}
-
-
-.label, .labeltop, .cflabel {
- font-weight: normal;
-}
-.value {
- font-weight: bold;
- display: inline-block;
-}
-
-div.value {
- display: block;
-}
-
-ul.ticketlist {
- list-style: none;
- padding-left: -0.5em;
- padding-right: -0.5em; /* to counteract the titlebox and get shading to the end*/
- margin-left: -0.5em;
- margin-right: -0.5em;
- padding: 0em;
- padding-bottom: 1em;
-}
-
-ul.ticketlist li.ticket {
- padding: 0.5em;
- font-weight: bold;
- border-bottom: 1px solid #999;
-
-}
-ul.ticketlist li.ticket:first-child {
- border-top: 1px solid #999;
-}
-
-ul.ticketlist li.ticket a.ticket{
- display: inline-block;
- font-size: 1em;
- width: 100%;
- padding: 0.5em;
- padding-bottom: 5em;
- margin-bottom: -5em;
-}
-ul.ticketlist li.ticket div.metadata {
-}
-
-
-ul.ticketlist li.ticket div.metadata div {
- padding: 0.2em;
- font-size:0.8em;
- display: block;
-}
-
-ul.ticketlist li.ticket div.metadata .label {
- display: inline-block;
- width: 6em;
- font-size: 0.8em;
- text-align: right;
- color: #666;
-}
-
-div#paging {
- text-align: center;
-}
-
-.ticket-reply .titlebox-title, .titlebox.search .titlebox-title, .titlebox.menu .titlebox-title, .ticket_menu .titlebox-title, .history .titlebox-title, #ticket-create-basics .titlebox-title{
- display: none;
-}
-
-a {
- color: #000;
-}
-
-.ticket_menu a, .menu a {
- text-decoration: none;
-}
-
-ul.menu a {
- padding: 0.5em;
- margin-top: -0.5em;
- margin-bottom: -0.5em;
- display: inline-block;
- width: 100%;
-}
-
-ul.menu a:after {
- color: #666;
- float: right;
- content: ">";
- font-size: 1.5em;
- padding: 0;
- margin: 0;
- padding-right: 1em;
-
-}
-
-ul.menu form {
- display: inline;
-}
-
-ul.menu form * {
- display: inline;
-}
-
-
-ul.menu form input[type=text] {
- width: 7em;
-}
-
-ul.menu form input{
-
- width: auto;
- padding: 0.5em;
- margin: -0.5em;
- margin-left: 1em;
-}
-
-.ticket_menu {
- text-align: center;
-}
-
-.ticket_menu ul {
- display: block;
- margin: 0;
- padding: 0;
-}
-
-.ticket_menu ul li {
-
- display: inline-block;
- text-align: center;
- padding-bottom: 0.25em;
- padding-top: 0.25em;
- font-size: 1em;
- width: 28%;
- padding-right: 0.3em;
- padding-left: 0.2em;
- border-right: 1px solid #000;
-}
-.ticket_menu ul li:last-child {
- padding-right: 0;
- border-right: 0;
-}
-
-.ticket-info-reminders table {
-
- width: 100%;
-}
-
-#ticket-create .label:after {
- content: ": ";
- padding-right: 0.25em;
-
-}
-
-#ticket-create .content-label {
- width: auto;
- display: block;
- text-align: left;
-
-}
-
-#ticket-show .label, .login-body .label {
- display: inline-block;
- text-align: right;
- width: 6em;
- padding-right: 0.25em;
- font-size: 0.8em;
-}
-
-.login-body .value {
- width: auto;
-}
-
-.history ul.history-list {
- padding: 0;
- margin: 0;
- padding-bottom: 2em;
-}
-
-
-.history ul.history-list li:first-child {
- border-top: 1px solid #ccc;
-}
-
-.history ul.history-list li {
- list-style: none;
- border-bottom: 1px solid #ccc;
- padding: 0.5em;
-}
-
-.history .age {
- display: inline-block;
- min-width: 8em;
- text-align: right;
-
-}
-
-div#login-box div.titlebox {
- width: 100%;
- margin-left:auto;
- margin-right: auto;
-}
-
-div#login-box input[type=text], div#login-box input[type=password] {
- width: 100%;
-}
-
-#bpscredits {
- float: right;
- clear: right;
- text-align: right;
- width: auto;
- font-size: 0.8em;
- padding: 1em;
-}
-
-#bpscredits #copyright {
- padding-top: 4em;
- background: white url(<%RT->Config->Get('WebPath')%>/NoAuth/images/bpslogo.png) no-repeat top right;
-}
-
-
-:focus {
- background-color: #ffc;
- border-color: #000;
- border-weight: 3px;
-}
-
-input[type=submit], input[type=button], button, #paging a {
- border: 2px outset;
- margin: 0.3em;
- padding: 0.3em;
- padding-left: 0.6em;
- padding-right: 0.6em;
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
- border-radius: 0.5em;
- background-color: #006699;
- color: #fff;
-}
-
-form {
-
- margin:0;
-}
-
-#gohome {
- position: absolute;
- top: 0;
- right: 0;
- border-left: 1px solid black;
- border-bottom: 1px solid black;
- -moz-border-radius-bottomleft: 1em;
- -webkit-border-bottom-left-radius: 1em;
- border-bottom-left-radius: 1em;
- padding: 0.5em;
- background-color: #fff;
-}
-
-#gohome a {
- font-size: 1em;
- padding: 0.25em;
- color: #000;
-}
-
-#logo {
- float: right;
- clear: right;
- text-align: center;
- padding: 1em;
- padding-bottom: 0.5em;
- margin: 0.25em 0.5em 0.25em 0.25em;
-}
-
-#logo .rtname {
- display: block;
- font-size: 0.9em;
-}
-
-#logo a img {
- border: 0;
- height: 2em;
- width: auto !important;
- padding-bottom: 0.5em;
-}
-
-div.txn-content {
-
- font-size:0.8em;
- padding-left:1em;
- padding-top:0.5em;
- margin-top: 0.5em;
- margin-left: 2em;
- padding-bottom: 0.5em;
- border-left: 5px solid #00c;
-
-}
-
-.label, .cflabel {
- text-align: left;
- width: 10em;
- color: #666;
- display: block;
- padding-bottom: 0.2em;
- padding-right: 0.2em;
-
-}
-
-div.entry, tr.input-row {
- margin-bottom: 0.25em;
- padding-bottom: 0.25em;
- border-bottom: 1px solid #ccc;
- display: block;
- width: 100%;
- min-height: 1em;
-}
-
-
-input[type=text], input[type=password], select {
- width: 100%;
-}
-
-.timefield input {
- width: 5em;
-}
-
-.timefield select {
- width: auto;
-}
-
-
-textarea {
- width: 100%;
-}
-
-a#fullsite {
- padding-left: 1em;
-}
-
-div.error .titlebox-title {
- background-color: #f00;
- color: #fff;
-}
-
-div.error div.error {
- background-color: #fcc;
-}
diff --git a/rt/share/html/m/_elements/ticket_list b/rt/share/html/m/_elements/ticket_list
index 6eec63e..608e9c8 100644
--- a/rt/share/html/m/_elements/ticket_list
+++ b/rt/share/html/m/_elements/ticket_list
@@ -80,7 +80,7 @@ if ($page > 1 && ! @{$collection->ItemsArrayRef||[]}) {
</%init>
<&| /m/_elements/wrapper, title =>
-loc("Found [quant,_1,ticket]",$collection->CountAll) &>
+loc("Found [quant,_1,ticket,tickets]",$collection->CountAll) &>
<&|/Widgets/TitleBox, class => 'search'
&>
<ul class="ticketlist">
@@ -91,9 +91,9 @@ loc("Found [quant,_1,ticket]",$collection->CountAll) &>
<%perl>
</%perl>
-<div class="requestors"><span class="label"><&|/l&>Requestors</&>:</span> <& /Ticket/Elements/ShowGroupMembers, Group => $ticket->Requestors, Ticket => $ticket &></div>
+<div class="requestors"><span class="label"><&|/l&>Requestors</&>:</span> <& /Ticket/Elements/ShowGroupMembers, Group => $ticket->Requestors, Ticket => $ticket, Link => 0 &></div>
<div class="status"><span class="label"><&|/l&>Status</&>:</span> <%$ticket->Status%></div>
-<div class="owner"><span class="label"><&|/l&>Owner</&>:</span> <& /Elements/ShowUser, User => $ticket->OwnerObj, Ticket => $ticket &></div>
+<div class="owner"><span class="label"><&|/l&>Owner</&>:</span> <& /Elements/ShowUser, User => $ticket->OwnerObj, Ticket => $ticket, Link => 0 &></div>
<div class="created"><span class="label"><&|/l&>Created</&>:</span> <%$ticket->CreatedObj->AgeAsString()%></div>
% if ($ticket->Priority) {
<div class="priority"><span class="label"><&|/l&>Priority</&>:</span> <%$ticket->Priority%></div>
diff --git a/rt/share/html/m/style.css b/rt/share/html/m/style.css
deleted file mode 100644
index 9ccc3ef..0000000
--- a/rt/share/html/m/style.css
+++ /dev/null
@@ -1,52 +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 }}}
-<%init>
- $HTML::Mason::Commands::r->content_type('text/css');
- $m->comp('/m/_elements/raw_style');
- $m->abort();
-</%init>
diff --git a/rt/share/html/m/ticket/create b/rt/share/html/m/ticket/create
index 5d72d1b..957e829 100644
--- a/rt/share/html/m/ticket/create
+++ b/rt/share/html/m/ticket/create
@@ -87,12 +87,9 @@ if ($CloneTicket) {
Status TimeLeft/;
$clone->{$_} = $CloneTicketObj->$_->AsString
- for grep { $CloneTicketObj->$_->Unix }
+ for grep { $CloneTicketObj->$_->IsSet }
map { $_ . "Obj" } qw/Starts Started Due Resolved/;
- my $members = $CloneTicketObj->Members;
- my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by );
- my $refers = $CloneTicketObj->RefersTo;
my $get_link_value = sub {
my ($link, $type) = @_;
my $uri_method = $type . 'URI';
@@ -105,6 +102,8 @@ if ($CloneTicket) {
return $link->$local_method || $uri->URI;
};
+ my (@refers, @refers_by);
+ my $refers = $CloneTicketObj->RefersTo;
while ( my $refer = $refers->Next ) {
my $refer_value = $get_link_value->($refer, 'Target');
push @refers, $refer_value if defined $refer_value;
@@ -126,7 +125,7 @@ if ($CloneTicket) {
while ( my $cf_value = $cf_values->Next ) {
push @cf_values, $cf_value->Content;
}
- $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} = join "\n",
+ $clone->{GetCustomFieldInputName( CustomField => $cf )} = join "\n",
@cf_values;
}
@@ -147,27 +146,31 @@ $m->callback( QueueObj => $QueueObj, title => \$title, results => \@results, ARG
$QueueObj->Disabled && Abort(loc("Cannot create tickets in a disabled queue."));
-my $CFs = $QueueObj->TicketCustomFields();
-
-my $ValidCFs = $m->comp(
- '/Elements/ValidateCustomFields',
- CustomFields => $CFs,
- ARGSRef => \%ARGS
-);
-
ProcessAttachments(ARGSRef => \%ARGS);
my $checks_failure = 0;
-my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
-$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
+{
+ my ($status, @msg) = $m->comp(
+ '/Elements/ValidateCustomFields',
+ CustomFields => $QueueObj->TicketCustomFields,
+ ARGSRef => \%ARGS
+ );
+ unless ( $status ) {
+ $checks_failure = 1;
+ push @results, @msg;
+ }
+}
+
+my $gnupg_widget = $m->comp('/Elements/Crypt/SignEncryptWidget:new', Arguments => \%ARGS );
+$m->comp( '/Elements/Crypt/SignEncryptWidget:Process',
self => $gnupg_widget,
QueueObj => $QueueObj,
);
if ( !exists $ARGS{'AddMoreAttach'} && ($ARGS{'id'}||'') eq 'new' ) {
- my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
+ my $status = $m->comp('/Elements/Crypt/SignEncryptWidget:Check',
self => $gnupg_widget,
Operation => 'Create',
QueueObj => $QueueObj,
@@ -196,18 +199,11 @@ $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create =>
checks_failure => $checks_failure, results => \@results );
if ((!exists $ARGS{'AddMoreAttach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
- if ( $ValidCFs && !$checks_failure && !$skip_create ) {
+ if ( !$checks_failure && !$skip_create ) {
$m->comp('show', %ARGS);
$RT::Logger->crit("After display call; error is $@");
$m->abort();
}
- elsif ( !$ValidCFs ) {
- # Invalid CFs
- while (my $CF = $CFs->Next) {
- my $msg = $m->notes('InvalidField-' . $CF->Id) or next;
- push @results, $CF->Name . ': ' . $msg;
- }
- }
}
@@ -218,9 +214,10 @@ if ((!exists $ARGS{'AddMoreAttach'}) and (defined($ARGS{'id'}) and $ARGS{'id'} e
<& /Elements/ListActions, actions => \@results &>
<form action="<% RT->Config->Get('WebPath') %>/m/ticket/create" method="post" enctype="multipart/form-data" name="TicketCreate" id="ticket-create">
<input type="hidden" class="hidden" name="id" value="new" />
+<input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
% $m->callback( CallbackName => 'FormStart', QueueObj => $QueueObj, ARGSRef => \%ARGS );
% if ($gnupg_widget) {
-<& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
+<& /Elements/Crypt/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
% }
@@ -253,11 +250,9 @@ $showrows->(
loc('Status') =>
$m->scomp(
- "/Elements/SelectStatus",
+ "/Ticket/Elements/SelectStatus",
Name => "Status",
QueueObj => $QueueObj,
- Default => $ARGS{Status} || $QueueObj->Lifecycle->DefaultOnCreate,
- DefaultValue => 0,
),
loc("Owner") =>
@@ -274,7 +269,7 @@ $showrows->(
"/Elements/EmailInput",
Name => 'Requestors',
Size => '40',
- Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress
+ Default => $ARGS{Requestors} // $session{CurrentUser}->EmailAddress
),
loc("Cc") =>
@@ -300,16 +295,22 @@ $showrows->(
</%perl>
-<& /Ticket/Elements/EditCustomFields, %ARGS, QueueObj => $QueueObj &>
+<& /Elements/EditCustomFields,
+ %ARGS,
+ Object => RT::Ticket->new($session{CurrentUser}),
+ CustomFields => $QueueObj->TicketCustomFields,
+ AsTable => 0,
+ &>
<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj &>
-% if (exists $session{'Attachments'}) {
+% if ( my $attachments = $session{'Attachments'}{ $ARGS{'Token'} }) {
<%loc("Attached file") %>
<%loc("Check box to delete")%><br />
-% foreach my $attach_name (keys %{$session{'Attachments'}}) {
-<input type="checkbox" class="checkbox" name="DeleteAttach-<%$attach_name%>" value="1" /><%$attach_name%><br />
+% foreach my $attach_name ( keys %$attachments ) {
+<input type="checkbox" class="checkbox" name="DeleteAttach" value="<% $attach_name %>" id="DeleteAttach-<% $attach_name %>" />
+<label for="DeleteAttach-<% $attach_name %>"><% $attach_name %></label><br />
% } # end of foreach
@@ -328,14 +329,14 @@ $showrows->(
% if ( $gnupg_widget ) {
-<& /Elements/GnuPG/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
+<& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
% }
<div class="ticket-info-basics">
- <&| /Widgets/TitleBox, title => loc('The Basics'),
- title_class=> 'inverse',
- color => "#993333" &>
+ <&| /Widgets/TitleBox, title => loc('The Basics'),
+ title_class=> 'inverse',
+ color => "#993333" &>
<%perl>
$showrows->(
loc("Priority") => $m->scomp(
@@ -353,29 +354,26 @@ $showrows->(
"/Elements/EditTimeValue",
Name => 'TimeEstimated',
Default => $ARGS{TimeEstimated} || '',
- InUnits => $ARGS{'TimeEstimated-TimeUnits'}
).'</span>',
loc("Time Worked") => '<span class="timefield">'.$m->scomp(
"/Elements/EditTimeValue",
Name => 'TimeWorked',
Default => $ARGS{TimeWorked} || '',
- InUnits => $ARGS{'TimeWorked-TimeUnits'}
). '</span>',
loc("Time Left") => '<span class="timefield">'.$m->scomp(
"/Elements/EditTimeValue",
Name => 'TimeLeft',
Default => $ARGS{TimeLeft} || '',
- InUnits => $ARGS{'TimeLeft-TimeUnits'}
).'</span>',
);
</%perl>
</&>
<&|/Widgets/TitleBox, title => loc("Dates"),
- title_class=> 'inverse',
- color => "#663366" &>
+ title_class=> 'inverse',
+ color => "#663366" &>
<%perl>
$showrows->(
diff --git a/rt/share/html/m/ticket/history b/rt/share/html/m/ticket/history
index 418bace..ac548af 100644
--- a/rt/share/html/m/ticket/history
+++ b/rt/share/html/m/ticket/history
@@ -61,7 +61,7 @@ my $history = $t->Transactions()->ItemsArrayRef;
% for my $entry (reverse @$history) {
<li>
<span class="age"><% $entry->CreatedObj->AgeAsString() %></span> -
-<& /Elements/ShowUser, User => $entry->CreatorObj &> -
+<& /Elements/ShowUser, User => $entry->CreatorObj, Link => 0 &> -
<%$entry->BriefDescription%>
% if ($entry->Type !~ /EmailRecord/) {
% if ($entry->ContentObj) {
diff --git a/rt/share/html/m/ticket/reply b/rt/share/html/m/ticket/reply
index bc7f0d6..9a92150 100644
--- a/rt/share/html/m/ticket/reply
+++ b/rt/share/html/m/ticket/reply
@@ -54,14 +54,18 @@
method="post" enctype="multipart/form-data">
<input type="hidden" class="hidden" name="DefaultStatus" value="<% $DefaultStatus ||''%>" />
<input type="hidden" class="hidden" name="Action" value="<% $ARGS{Action}||'' %>" />
+<input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
% if ($gnupg_widget) {
-<& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
+<& /Elements/Crypt/SignEncryptWidget:ShowIssues, self => $gnupg_widget &>
% }
<div class="entry"><span class="label"><&|/l&>Status</&>:</span>
<div class="value">
-<& /Elements/SelectStatus, Name=>"Status", TicketObj => $t, DefaultLabel => loc("[_1] (Unchanged)", loc($t->Status)), Default => $ARGS{'Status'} || ($t->Status eq $DefaultStatus ? undef : $DefaultStatus)&>
+<& /Ticket/Elements/SelectStatus,
+ Name=>"Status",
+ TicketObj => $t,
+ Default => $DefaultStatus &>
</div></div>
<div class="entry"><span class="label"><&|/l&>Owner</&>:</span>
@@ -70,7 +74,7 @@
Name => "Owner",
TicketObj => $t,
QueueObj => $t->QueueObj,
- DefaultLabel => loc("[_1] (Unchanged)", $m->scomp('/Elements/ShowUser', User => $t->OwnerObj)),
+ DefaultLabel => loc("[_1] (Unchanged)", $t->OwnerObj->Format),
Default => $ARGS{'Owner'}
&>
</div></div>
@@ -78,7 +82,6 @@
<& /Elements/EditTimeValue,
Name => 'UpdateTimeWorked',
Default => $ARGS{UpdateTimeWorked}||'',
- InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'}||'minutes',
&>
</span></div>
% $m->callback( %ARGS, CallbackName => 'AfterWorked', Ticket => $t );
@@ -137,7 +140,7 @@
</div>
% if ( $gnupg_widget ) {
-<& /Elements/GnuPG/SignEncryptWidget, self => $gnupg_widget, QueueObj => $t->QueueObj &>
+<& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $t->QueueObj &>
% }
<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &>
@@ -209,8 +212,8 @@ ProcessAttachments(ARGSRef => \%ARGS);
}
}
-my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
-$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
+my $gnupg_widget = $m->comp('/Elements/Crypt/SignEncryptWidget:new', Arguments => \%ARGS );
+$m->comp( '/Elements/Crypt/SignEncryptWidget:Process',
self => $gnupg_widget,
TicketObj => $t,
);
@@ -220,7 +223,7 @@ $m->callback( CallbackName => 'BeforeUpdate', ARGSRef => \%ARGS, skip_update =>
checks_failure => $checks_failure, results => \@results, TicketObj => $t );
if ( !$checks_failure && !$skip_update && exists $ARGS{SubmitTicket} ) {
- my $status = $m->comp('/Elements/GnuPG/SignEncryptWidget:Check',
+ my $status = $m->comp('/Elements/Crypt/SignEncryptWidget:Check',
self => $gnupg_widget,
TicketObj => $t,
);
diff --git a/rt/share/html/m/ticket/show b/rt/share/html/m/ticket/show
index 4516f9f..ebf39ac 100644
--- a/rt/share/html/m/ticket/show
+++ b/rt/share/html/m/ticket/show
@@ -69,10 +69,7 @@ if ($ARGS{'id'} eq 'new') {
Abort('You have no permission to create tickets in that queue.');
}
- ($Ticket, @Actions) = CreateTicket(
- Attachments => delete $session{'Attachments'},
- %ARGS,
- );
+ ($Ticket, @Actions) = CreateTicket( %ARGS );
unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
Abort("No permission to view newly created ticket #".$Ticket->id.".");
}
@@ -95,14 +92,12 @@ if ($ARGS{'id'} eq 'new') {
ARGSRef => \%ARGS,
Actions => \@Actions);
- $ARGS{UpdateAttachments} = $session{'Attachments'};
push @Actions,
ProcessUpdateMessage(
ARGSRef => \%ARGS,
Actions => \@Actions,
TicketObj => $Ticket,
);
- delete $session{'Attachments'};
#Process status updates
push @Actions, ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj => $Ticket );
@@ -152,7 +147,7 @@ if (@Actions) {
# If we haven't been passed in an Attachments object (through the precaching mechanism)
# then we need to find one
-my $Attachments = $m->comp('/Ticket/Elements/FindAttachments', Ticket => $Ticket);
+my $Attachments = $Ticket->Attachments;
my %documents;
while ( my $attach = $Attachments->Next() ) {
@@ -172,7 +167,7 @@ my $print_value = sub {
my $linked = $value->LinkValueTo;
if ( defined $linked && length $linked ) {
my $linked = $m->interp->apply_escapes( $linked, 'h' );
- $m->out('<a href="'. $linked .'" target="_new">');
+ $m->out('<a href="'. $linked .'" target="_blank">');
}
my $comp = "ShowCustomField". $cf->Type;
$m->callback(
@@ -253,7 +248,7 @@ my $print_value = sub {
</div>
</&>
-% if ($Ticket->CustomFields->First) {
+% if ($CustomFields->Count) {
<&| /Widgets/TitleBox, title => loc('Custom Fields'),
class => 'ticket-info-cfs',
&>
@@ -289,20 +284,20 @@ my $print_value = sub {
<div class="entry">
<div class="label"><&|/l&>Owner</&>:</div>
- <div class="value"><& /Elements/ShowUser, User => $Ticket->OwnerObj, Ticket => $Ticket &>
+ <div class="value"><& /Elements/ShowUser, User => $Ticket->OwnerObj, Ticket => $Ticket, Link => 0 &>
</div>
</div>
<div class="entry">
<div class="label"><&|/l&>Requestors</&>:</div>
- <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></div>
+ <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket, Link => 0 &></div>
</div>
<div class="entry">
<div class="label"><&|/l&>Cc</&>:</div>
- <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></div>
+ <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket, Link => 0 &></div>
</div>
<div class="entry">
<div class="label"><&|/l&>AdminCc</&>:</div>
- <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></div>
+ <div class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket, Link => 0 &></div>
</div>
</&>
@@ -318,34 +313,10 @@ my $print_value = sub {
<%$key%><br />
<ul>
% foreach my $rev (@{$documents{$key}}) {
-
-<%PERL>
-my $size = $rev->ContentLength;
-
-if ($size) {
- my $kb = int($size/102.4) / 10;
- my $units = RT->Config->Get('AttachmentUnits');
-
- if (!defined($units)) {
- if ($size > 1024) {
- $size = $kb . "k";
- }
- else {
- $size = $size . "b";
- }
- }
- elsif ($units eq 'k') {
- $size = $kb . "k";
- }
- else {
- $size = $size . "b";
- }
-
-</%PERL>
-
+% if ($rev->ContentLength) {
<li><font size="-2">
-<a href="<%RT->Config->Get('WebPath')%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | un%>">
-<&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
+<a href="<%RT->Config->Get('WebPath')%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | un %>">
+<&|/l, $rev->CreatedAsString, $rev->FriendlyContentLength, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&>
</a>
</font></li>
% }
@@ -394,7 +365,7 @@ if ($size) {
<div class="entry">
<div class="label date due"><&|/l&>Due</&>:</div>
% my $due = $Ticket->DueObj;
-% if ( $due && $due->Unix > 0 && $due->Diff < 0 ) {
+% if ( $due && $due->IsSet && $due->Diff < 0 && $Ticket->QueueObj->IsActiveStatus($Ticket->Status) ) {
<div class="value date due"><span class="overdue"><% $due->AsString %></span></div>
% } else {
<div class="value date due"><% $due->AsString %></div>
@@ -456,11 +427,11 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
</div>
<div class="entry">
<div class="label"><% loc('Parents') %>:</div>
- <div class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></div>
+ <div class="value"><& /Elements/ShowLinksOfType, Object => $Ticket, Type => 'MemberOf' &></div>
</div>
<div class="entry">
<div class="label"><% loc('Children')%>:</div>
- <div class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></div>
+ <div class="value"><& /Elements/ShowLinksOfType, Object => $Ticket, Type => 'Members' &></div>
</div>
<div class="entry">
<div class="label"><% loc('Refers to')%>:</div>
diff --git a/rt/share/html/m/tickets/search b/rt/share/html/m/tickets/search
index 561e859..0edc917 100644
--- a/rt/share/html/m/tickets/search
+++ b/rt/share/html/m/tickets/search
@@ -52,7 +52,7 @@ $order => 'desc'
$name => undef
</%args>
<%init>
-use RT::Search::Googleish;
+use RT::Search::Simple;
my $query = $ARGS{'query'};
if ($ARGS{'q'}) {
my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
@@ -60,7 +60,7 @@ if ($ARGS{'q'}) {
Argument => $ARGS{q},
TicketsObj => $tickets,
);
- my $search = RT::Search::Googleish->new(%args);
+ my $search = RT::Search::Simple->new(%args);
$query = $search->QueryToSQL();
}
@@ -90,11 +90,16 @@ my $search;
if ( $_->{'Query'} =~ /__Bookmarks__/ ) {
$_->{'Rows'} = 999;
- # DEPRECATED: will be here for a while up to 3.10/4.0
- my $bookmarks = $session{'CurrentUser'}->UserObj->FirstAttribute('Bookmarks');
- $bookmarks = $bookmarks->Content if $bookmarks;
- $bookmarks ||= {};
- my $query = join( " OR ", map " id = '$_' ", grep $bookmarks->{$_}, keys %$bookmarks ) || 'id=0';
+ # DEPRECATED: will be here for a while up to 4.4
+ RT->Deprecated(
+ Remove => "4.4",
+ Instead => "id = '__Bookmarked__'",
+ Message => "The __Bookmarks__ query syntax is deprecated",
+ Object => $search,
+ );
+
+ my @bookmarks = $session{'CurrentUser'}->UserObj->Bookmarks;
+ my $query = join(" OR ", map " id = '$_' ", @bookmarks ) || 'id=0';
$_->{'Query'} =~ s/__Bookmarks__/( $query )/g;
}
}