diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:21:24 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:21:24 -0700 |
commit | 679854b8bbc65d112071111bbd7f34a6a481fb30 (patch) | |
tree | dda0862fdf7853f4f61e4cf155c8bbc93768c994 /rt/share/html/Ticket | |
parent | 9b328d940af56b9924a342192ebb0790478fa705 (diff) |
RT 4.0.13
Diffstat (limited to 'rt/share/html/Ticket')
67 files changed, 181 insertions, 187 deletions
diff --git a/rt/share/html/Ticket/Attachment/WithHeaders/dhandler b/rt/share/html/Ticket/Attachment/WithHeaders/dhandler index 11b77010c..d9a94f270 100644 --- a/rt/share/html/Ticket/Attachment/WithHeaders/dhandler +++ b/rt/share/html/Ticket/Attachment/WithHeaders/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Attachment/dhandler b/rt/share/html/Ticket/Attachment/dhandler index eb291e4f5..6dde34c37 100755 --- a/rt/share/html/Ticket/Attachment/dhandler +++ b/rt/share/html/Ticket/Attachment/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -70,7 +70,7 @@ my $content_type = $AttachmentObj->ContentType || 'text/plain'; if (RT->Config->Get('AlwaysDownloadAttachments')) { - $r->headers_out->{'Content-Disposition'} = "attachment; filename=" . $AttachmentObj->Filename; + $r->headers_out->{'Content-Disposition'} = "attachment"; } elsif (!RT->Config->Get('TrustHTMLAttachments')) { $content_type = 'text/plain' if ($content_type =~ /^text\/html/i); diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 8c6a58ad0..6d84b036d 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -376,32 +376,7 @@ my $ValidCFs = $m->comp( ARGSRef => \%ARGS ); -# deal with deleting uploaded attachments -foreach my $key (keys %ARGS) { - if ($key =~ m/^DeleteAttach-(.+)$/) { - delete $session{'Attachments'}{$1}; - } - $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; -} - -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{$session{'Attachments'} || {}}, - $file_path => $attachment, - }; -} - -# delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and - ($ARGS{'id'} eq 'new' or $ARGS{'id'} eq 'refresh')) { - delete $session{'Attachments'}; -} +ProcessAttachments(ARGSRef => \%ARGS); my $checks_failure = 0; diff --git a/rt/share/html/Ticket/Display.html b/rt/share/html/Ticket/Display.html index 0a29c9763..0ff9e0b47 100755 --- a/rt/share/html/Ticket/Display.html +++ b/rt/share/html/Ticket/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -189,10 +189,12 @@ if ($ARGS{'id'} eq 'new') { push @Actions, ProcessTicketReminders( ARGSRef => \%ARGS, TicketObj => $TicketObj ); - # XXX: we shouldn't block actions here if user has no right to see the ticket, - # but we should allow him to see actions he has done unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); + if (@Actions) { + Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@Actions); + } else { + Abort("No permission to view ticket"); + } } if ( $ARGS{'MarkAsSeen'} ) { $TicketObj->SetAttribute( diff --git a/rt/share/html/Ticket/Elements/AddAttachments b/rt/share/html/Ticket/Elements/AddAttachments index 008685884..d00a021af 100644 --- a/rt/share/html/Ticket/Elements/AddAttachments +++ b/rt/share/html/Ticket/Elements/AddAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/AddWatchers b/rt/share/html/Ticket/Elements/AddWatchers index 8590a2aef..8e11ba28d 100755 --- a/rt/share/html/Ticket/Elements/AddWatchers +++ b/rt/share/html/Ticket/Elements/AddWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/Bookmark b/rt/share/html/Ticket/Elements/Bookmark index 30c9a4356..b74da799f 100644 --- a/rt/share/html/Ticket/Elements/Bookmark +++ b/rt/share/html/Ticket/Elements/Bookmark @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/BulkLinks b/rt/share/html/Ticket/Elements/BulkLinks index bae556cd1..3d9abeefe 100755 --- a/rt/share/html/Ticket/Elements/BulkLinks +++ b/rt/share/html/Ticket/Elements/BulkLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ClickToShowHistory b/rt/share/html/Ticket/Elements/ClickToShowHistory index 5a9a477e0..b570fe683 100644 --- a/rt/share/html/Ticket/Elements/ClickToShowHistory +++ b/rt/share/html/Ticket/Elements/ClickToShowHistory @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditBasics b/rt/share/html/Ticket/Elements/EditBasics index b428aab29..0d4159f81 100755 --- a/rt/share/html/Ticket/Elements/EditBasics +++ b/rt/share/html/Ticket/Elements/EditBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditCustomFields b/rt/share/html/Ticket/Elements/EditCustomFields index 29ac95ad0..237dcbf37 100755 --- a/rt/share/html/Ticket/Elements/EditCustomFields +++ b/rt/share/html/Ticket/Elements/EditCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditDates b/rt/share/html/Ticket/Elements/EditDates index 93ca4cc30..d0474fedb 100755 --- a/rt/share/html/Ticket/Elements/EditDates +++ b/rt/share/html/Ticket/Elements/EditDates @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditPeople b/rt/share/html/Ticket/Elements/EditPeople index 09cf6f365..adc48b7cd 100755 --- a/rt/share/html/Ticket/Elements/EditPeople +++ b/rt/share/html/Ticket/Elements/EditPeople @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditTransactionCustomFields b/rt/share/html/Ticket/Elements/EditTransactionCustomFields index e9a1bbb5c..961c7e16d 100644 --- a/rt/share/html/Ticket/Elements/EditTransactionCustomFields +++ b/rt/share/html/Ticket/Elements/EditTransactionCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/EditWatchers b/rt/share/html/Ticket/Elements/EditWatchers index abfbf0096..3bc6cd725 100755 --- a/rt/share/html/Ticket/Elements/EditWatchers +++ b/rt/share/html/Ticket/Elements/EditWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/FindAttachments b/rt/share/html/Ticket/Elements/FindAttachments index cb9975199..546b4b818 100644 --- a/rt/share/html/Ticket/Elements/FindAttachments +++ b/rt/share/html/Ticket/Elements/FindAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/FindTransactions b/rt/share/html/Ticket/Elements/FindTransactions index 6faf33ee1..e0f13b9d4 100644 --- a/rt/share/html/Ticket/Elements/FindTransactions +++ b/rt/share/html/Ticket/Elements/FindTransactions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/FoldStanzaJS b/rt/share/html/Ticket/Elements/FoldStanzaJS index 4b0b4c466..581c963d9 100644 --- a/rt/share/html/Ticket/Elements/FoldStanzaJS +++ b/rt/share/html/Ticket/Elements/FoldStanzaJS @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/LoadTextAttachments b/rt/share/html/Ticket/Elements/LoadTextAttachments index b1ff5326a..9321030b9 100644 --- a/rt/share/html/Ticket/Elements/LoadTextAttachments +++ b/rt/share/html/Ticket/Elements/LoadTextAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/PreviewScrips b/rt/share/html/Ticket/Elements/PreviewScrips index 75fbc4563..e9e2fc963 100755 --- a/rt/share/html/Ticket/Elements/PreviewScrips +++ b/rt/share/html/Ticket/Elements/PreviewScrips @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -52,6 +52,8 @@ $TicketObj => undef my $Object = $m->notes("DryRun-".$TicketObj->Id) || $TicketObj->DryRun(%ARGS); my %recips = %{ $m->notes("DryRun-Recipients-".$TicketObj->Id) || {} }; return unless $Object; + +my %squelched = ProcessTransactionSquelching( \%ARGS ); </%init> <p> <&|/l, RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$TicketObj->Id, @@ -75,7 +77,7 @@ return unless $Object; <ul> % for my $addr (@addresses) { <li> -% my $checked = 1; +% my $checked = not $squelched{$addr->address}; % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked); % $recips{$addr->address}++; <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" /> @@ -102,7 +104,7 @@ return unless $Object; <ul> % for my $address (@{$data->{$type}}) { <li> -% my $checked = 1; +% my $checked = not $squelched{$address}; % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => Email::Address->parse($address), Type => $type, Checked => \$checked); % $recips{$address}++; <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$address%>" id="TxnSendMailTo-<% $address %>-<% $recips{$address} %>" /> @@ -116,4 +118,6 @@ return unless $Object; % } % } +% $m->callback( CallbackName => 'AfterRecipients', TicketObj => $TicketObj ); + % $m->notes("DryRun-Recipients-".$TicketObj->Id, \%recips); diff --git a/rt/share/html/Ticket/Elements/Reminders b/rt/share/html/Ticket/Elements/Reminders index 36d0d8e35..37b360bd2 100644 --- a/rt/share/html/Ticket/Elements/Reminders +++ b/rt/share/html/Ticket/Elements/Reminders @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -67,6 +67,7 @@ my $has_reminders = $count_tickets->Count; # We've made changes, let's reload our search my $reminder_collection = $count_reminders->Collection; +my $visible = 0; </%init> <input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" /> <input type="hidden" class="hidden" name="update-reminders" value="1" /> @@ -83,7 +84,6 @@ my $reminder_collection = $count_reminders->Collection; % } </tr> % my $i = 0; -% my $visible = 0; % while ( my $reminder = $reminder_collection->Next ) { % $i++; % if ( $reminder->Status eq $resolve_status && !$ShowCompleted ) { @@ -112,8 +112,11 @@ my $reminder_collection = $count_reminders->Collection; % } % } +% if ($Ticket->Status ne "deleted") { <&|/l&>New reminder:</&> <& SELF:NewReminder, Ticket => $Ticket &> +% } +% return($Ticket->Status ne "deleted" or $visible); <%method NewReminder> <%args> $Ticket diff --git a/rt/share/html/Ticket/Elements/ShowAttachments b/rt/share/html/Ticket/Elements/ShowAttachments index 12130e4de..c487fee51 100755 --- a/rt/share/html/Ticket/Elements/ShowAttachments +++ b/rt/share/html/Ticket/Elements/ShowAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -82,7 +82,7 @@ if ($size) { </%PERL> <li><font size="-2"> -<a href="<%RT->Config->Get('WebPath')%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>"> +<a href="<%RT->Config->Get('WebPath')%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | un %>"> % my $desc = loc("[_1] ([_2]) by [_3]", $rev->CreatedAsString, $size, $m->scomp('/Elements/ShowUser', User => $rev->CreatorObj)); <% $desc |n%> </a> diff --git a/rt/share/html/Ticket/Elements/ShowBasics b/rt/share/html/Ticket/Elements/ShowBasics index 0ecb6d8ba..f329d5061 100755 --- a/rt/share/html/Ticket/Elements/ShowBasics +++ b/rt/share/html/Ticket/Elements/ShowBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowCustomFields b/rt/share/html/Ticket/Elements/ShowCustomFields index 4a0604331..ad8f825cf 100755 --- a/rt/share/html/Ticket/Elements/ShowCustomFields +++ b/rt/share/html/Ticket/Elements/ShowCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowDates b/rt/share/html/Ticket/Elements/ShowDates index c0d26f7c1..0d7591a65 100755 --- a/rt/share/html/Ticket/Elements/ShowDates +++ b/rt/share/html/Ticket/Elements/ShowDates @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowDependencies b/rt/share/html/Ticket/Elements/ShowDependencies index d56aa862c..08056cb32 100755 --- a/rt/share/html/Ticket/Elements/ShowDependencies +++ b/rt/share/html/Ticket/Elements/ShowDependencies @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowGnuPGStatus b/rt/share/html/Ticket/Elements/ShowGnuPGStatus index 126f23b9e..d246954b9 100644 --- a/rt/share/html/Ticket/Elements/ShowGnuPGStatus +++ b/rt/share/html/Ticket/Elements/ShowGnuPGStatus @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowGroupMembers b/rt/share/html/Ticket/Elements/ShowGroupMembers index add377d74..046a4339d 100644 --- a/rt/share/html/Ticket/Elements/ShowGroupMembers +++ b/rt/share/html/Ticket/Elements/ShowGroupMembers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowHistory b/rt/share/html/Ticket/Elements/ShowHistory index 909ea01ee..610038d6f 100755 --- a/rt/share/html/Ticket/Elements/ShowHistory +++ b/rt/share/html/Ticket/Elements/ShowHistory @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowMembers b/rt/share/html/Ticket/Elements/ShowMembers index 1ffbda2a1..7a217d7e5 100755 --- a/rt/share/html/Ticket/Elements/ShowMembers +++ b/rt/share/html/Ticket/Elements/ShowMembers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowMessageHeaders b/rt/share/html/Ticket/Elements/ShowMessageHeaders index 5a91668c1..1ae67171c 100755 --- a/rt/share/html/Ticket/Elements/ShowMessageHeaders +++ b/rt/share/html/Ticket/Elements/ShowMessageHeaders @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowMessageStanza b/rt/share/html/Ticket/Elements/ShowMessageStanza index 8a8544328..716bdfbf0 100755 --- a/rt/share/html/Ticket/Elements/ShowMessageStanza +++ b/rt/share/html/Ticket/Elements/ShowMessageStanza @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -77,16 +77,16 @@ my $print_content = sub { $m->out($$ref); }; -if ( ref $Message ) { - $m->out('<pre>') - if ( $ContentType eq 'text/plain' - && $plain_text_pre - && !$Depth - && !$plain_text_mono ); - $m->out( '<div class="message-stanza' - . ( ($ContentType eq 'text/plain' && $plain_text_mono) ? ' plain-text-white-space' : '' ) . '"' - . '>' ); +$m->out('<pre>') + if ( $ContentType eq 'text/plain' + && $plain_text_pre + && !$Depth + && !$plain_text_mono ); +$m->out( '<div class="message-stanza' + . ( ($ContentType eq 'text/plain' && $plain_text_mono) ? ' plain-text-white-space' : '' ) . '"' + . '>' ); +if ( ref $Message ) { my @stack; my $para = ''; my $i = 0; @@ -170,16 +170,16 @@ AGAIN: foreach ( ; $i < @$Message; $i++ ) { $m->out('</div>'); goto AGAIN; } - - $m->out('</div>'); - $m->out('</pre>') - if ( $ContentType eq 'text/plain' - && $plain_text_pre - && !$Depth - && !$plain_text_mono ); } else { $print_content->( \$Message ); } + +$m->out('</div>'); +$m->out('</pre>') + if ( $ContentType eq 'text/plain' + && $plain_text_pre + && !$Depth + && !$plain_text_mono ); </%INIT> <%ARGS> $Message => undef diff --git a/rt/share/html/Ticket/Elements/ShowParents b/rt/share/html/Ticket/Elements/ShowParents index 2a64cfce0..ed7a0d4d3 100644 --- a/rt/share/html/Ticket/Elements/ShowParents +++ b/rt/share/html/Ticket/Elements/ShowParents @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowPeople b/rt/share/html/Ticket/Elements/ShowPeople index 8047aff85..23faf9bb4 100755 --- a/rt/share/html/Ticket/Elements/ShowPeople +++ b/rt/share/html/Ticket/Elements/ShowPeople @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowPriority b/rt/share/html/Ticket/Elements/ShowPriority index 7b6b361a1..906538ad3 100644 --- a/rt/share/html/Ticket/Elements/ShowPriority +++ b/rt/share/html/Ticket/Elements/ShowPriority @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowQueue b/rt/share/html/Ticket/Elements/ShowQueue index 255225591..118108f6d 100644 --- a/rt/share/html/Ticket/Elements/ShowQueue +++ b/rt/share/html/Ticket/Elements/ShowQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowRequestor b/rt/share/html/Ticket/Elements/ShowRequestor index 8a8eef62c..a82a24007 100755 --- a/rt/share/html/Ticket/Elements/ShowRequestor +++ b/rt/share/html/Ticket/Elements/ShowRequestor @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -132,7 +132,7 @@ % } % if ( $has_right_adminusers ) { - <a class="modify-user" href="<% RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id %>">Modify this user</a> + <a class="modify-user" href="<% RT->Config->Get('WebPath')."/Admin/Users/Modify.html?id=".$requestor->id %>"><&|/l&>Modify this user</&></a> % } %# end of individual requestor details <div> diff --git a/rt/share/html/Ticket/Elements/ShowRequestorExtraInfo b/rt/share/html/Ticket/Elements/ShowRequestorExtraInfo index a5989ab6b..0418a0011 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorExtraInfo +++ b/rt/share/html/Ticket/Elements/ShowRequestorExtraInfo @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowRequestorTickets b/rt/share/html/Ticket/Elements/ShowRequestorTickets index 1dfd08ef6..b9f984a60 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorTickets +++ b/rt/share/html/Ticket/Elements/ShowRequestorTickets @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowRequestorTicketsActive b/rt/share/html/Ticket/Elements/ShowRequestorTicketsActive index ba89988f3..9aee04098 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorTicketsActive +++ b/rt/share/html/Ticket/Elements/ShowRequestorTicketsActive @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowRequestorTicketsAll b/rt/share/html/Ticket/Elements/ShowRequestorTicketsAll index 772cd6899..ac31d9943 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorTicketsAll +++ b/rt/share/html/Ticket/Elements/ShowRequestorTicketsAll @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowRequestorTicketsInactive b/rt/share/html/Ticket/Elements/ShowRequestorTicketsInactive index 968968c68..b8d5a0184 100644 --- a/rt/share/html/Ticket/Elements/ShowRequestorTicketsInactive +++ b/rt/share/html/Ticket/Elements/ShowRequestorTicketsInactive @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients b/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients index 590006b53..a27375aa1 100644 --- a/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients +++ b/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -73,16 +73,17 @@ if ($Object->Rules) { } } my %recips; +my %squelched = ProcessTransactionSquelching( \%ARGS ); </%init> <&|/Widgets/TitleBox, title => loc('Recipients'), id => 'recipients' &> <table> -<tr> % for my $type (qw(To Cc Bcc)) { % next unless keys %{$headers{$type}}; +<tr> <td valign="top"><% $type %>:</td> <td valign="top"> % for my $addr (sort {$a->address cmp $b->address} values %{$headers{$type}}) { -% my $checked = 1; +% my $checked = not $squelched{$addr->address}; % $m->callback(CallbackName => 'BeforeAddress', Ticket => $TicketObj, Address => $addr, Type => $type, Checked => \$checked); % $recips{$addr->address}++; <input type="checkbox" class="checkbox" name="TxnSendMailTo" <% $checked ? 'checked="checked"' : '' |n%> value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" /> @@ -92,6 +93,7 @@ my %recips; % } </td></tr> % } +% $m->callback( CallbackName => 'AfterRecipients', TicketObj => $TicketObj ); </table> <i>(Uncheck boxes to disable notifications to the listed recipients. Does <b>not</b> change who will receive future diff --git a/rt/share/html/Ticket/Elements/ShowSummary b/rt/share/html/Ticket/Elements/ShowSummary index a1d1610dc..797f6edc7 100755 --- a/rt/share/html/Ticket/Elements/ShowSummary +++ b/rt/share/html/Ticket/Elements/ShowSummary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -82,8 +82,9 @@ &> <table><tr><td> <form action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" name="UpdateReminders" id="UpdateReminders" method="post"> - <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> +% if ( $m->comp("/Ticket/Elements/Reminders", Ticket => $Ticket, ShowCompleted => 0) ) { <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div> +% } </form> </td></tr></table> </&> diff --git a/rt/share/html/Ticket/Elements/ShowTime b/rt/share/html/Ticket/Elements/ShowTime index fc678c2d5..a62668f46 100644 --- a/rt/share/html/Ticket/Elements/ShowTime +++ b/rt/share/html/Ticket/Elements/ShowTime @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowTransaction b/rt/share/html/Ticket/Elements/ShowTransaction index 2e0acd39e..2c217b438 100755 --- a/rt/share/html/Ticket/Elements/ShowTransaction +++ b/rt/share/html/Ticket/Elements/ShowTransaction @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowTransactionAttachments b/rt/share/html/Ticket/Elements/ShowTransactionAttachments index 95a23411b..bf9aad054 100644 --- a/rt/share/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/share/html/Ticket/Elements/ShowTransactionAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -257,12 +257,13 @@ my $render_attachment = sub { } my $filename = length $name ? $name : loc('(untitled)'); + my $efilename = $m->interp->apply_escapes( $filename, 'h' ); $m->out('<img' . ' alt="' - . $filename + . $efilename . '"' . ' title="' - . $filename + . $efilename . '"' . ' src="' . $AttachPath . '/' diff --git a/rt/share/html/Ticket/Elements/ShowUpdateStatus b/rt/share/html/Ticket/Elements/ShowUpdateStatus index 07a57e139..e9f534159 100644 --- a/rt/share/html/Ticket/Elements/ShowUpdateStatus +++ b/rt/share/html/Ticket/Elements/ShowUpdateStatus @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/ShowUserEntry b/rt/share/html/Ticket/Elements/ShowUserEntry index fe3d35f9e..857998108 100644 --- a/rt/share/html/Ticket/Elements/ShowUserEntry +++ b/rt/share/html/Ticket/Elements/ShowUserEntry @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Elements/UpdateCc b/rt/share/html/Ticket/Elements/UpdateCc index d062156c7..2435fc496 100644 --- a/rt/share/html/Ticket/Elements/UpdateCc +++ b/rt/share/html/Ticket/Elements/UpdateCc @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Forward.html b/rt/share/html/Ticket/Forward.html index 8aa75c7a8..2c20daf5d 100644 --- a/rt/share/html/Ticket/Forward.html +++ b/rt/share/html/Ticket/Forward.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/GnuPG.html b/rt/share/html/Ticket/GnuPG.html index d15ce720a..f3a29f6d2 100644 --- a/rt/share/html/Ticket/GnuPG.html +++ b/rt/share/html/Ticket/GnuPG.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Graphs/Elements/EditGraphProperties b/rt/share/html/Ticket/Graphs/Elements/EditGraphProperties index c5479e3f0..df402bc58 100644 --- a/rt/share/html/Ticket/Graphs/Elements/EditGraphProperties +++ b/rt/share/html/Ticket/Graphs/Elements/EditGraphProperties @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Graphs/Elements/ShowGraph b/rt/share/html/Ticket/Graphs/Elements/ShowGraph index 2163b81a8..5dc5e1425 100644 --- a/rt/share/html/Ticket/Graphs/Elements/ShowGraph +++ b/rt/share/html/Ticket/Graphs/Elements/ShowGraph @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Graphs/Elements/ShowLegends b/rt/share/html/Ticket/Graphs/Elements/ShowLegends index 4c63d4b38..cd19aa634 100644 --- a/rt/share/html/Ticket/Graphs/Elements/ShowLegends +++ b/rt/share/html/Ticket/Graphs/Elements/ShowLegends @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Graphs/dhandler b/rt/share/html/Ticket/Graphs/dhandler index 89b1f37e1..b3c751bee 100644 --- a/rt/share/html/Ticket/Graphs/dhandler +++ b/rt/share/html/Ticket/Graphs/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Graphs/index.html b/rt/share/html/Ticket/Graphs/index.html index 80ec9f347..f0f32606a 100644 --- a/rt/share/html/Ticket/Graphs/index.html +++ b/rt/share/html/Ticket/Graphs/index.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/History.html b/rt/share/html/Ticket/History.html index afc174fd6..8972fcda3 100755 --- a/rt/share/html/Ticket/History.html +++ b/rt/share/html/Ticket/History.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Modify.html b/rt/share/html/Ticket/Modify.html index 372a84e23..146384e2e 100755 --- a/rt/share/html/Ticket/Modify.html +++ b/rt/share/html/Ticket/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -85,10 +85,13 @@ push @results, ProcessTicketStatus(TicketObj => $TicketObj, ARGSRef => \%ARGS); $TicketObj->ApplyTransactionBatch; -# TODO: display the results, even if we can't display the ticket unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); -} + if (@results) { + Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@results); + } else { + Abort("No permission to view ticket"); + } +} </%INIT> <%ARGS> diff --git a/rt/share/html/Ticket/ModifyAll.html b/rt/share/html/Ticket/ModifyAll.html index 4ed393451..d36076cf2 100755 --- a/rt/share/html/Ticket/ModifyAll.html +++ b/rt/share/html/Ticket/ModifyAll.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -112,7 +112,7 @@ <tr> <td class="labeltop"><&|/l&>Content</&>:</td> <td class="entry"> -% if (defined $ARGS{UpdateContent} && length($ARGS{UpdateContent} && !grep { /Message recorded/ } @results )) { +% if ( defined $ARGS{UpdateContent} && length $ARGS{UpdateContent} ) { <& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0 &> % } else { <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &> @@ -152,32 +152,7 @@ $CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or $Ticket->CurrentUserHasRight('ModifyTicket') ); -# deal with deleting uploaded attachments -foreach my $key (keys %ARGS) { - if ($key =~ m/^DeleteAttach-(.+)$/) { - delete $session{'Attachments'}{$1}; - } - $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; -} - -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{$session{'Attachments'} || {}}, - $file_path => $attachment, - }; -} - -# delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) { - delete $session{'Attachments'}; -} - +ProcessAttachments(ARGSRef => \%ARGS); $m->callback( TicketObj => $Ticket, ARGSRef => \%ARGS ); my @results; @@ -215,11 +190,19 @@ unless ($OnlySearchForPeople or $OnlySearchForGroup or $ARGS{'AddMoreAttach'} ) $Ticket->ApplyTransactionBatch; -# If they've gone and moved the ticket to somewhere they can't see, etc... -# TODO: display the results, even if we can't display the ticket. +MaybeRedirectForResults( + Actions => \@results, + Path => "/Ticket/ModifyAll.html", + Arguments => { id => $Ticket->id }, +); +# If they've gone and moved the ticket to somewhere they can't see, etc... unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); + if (@results) { + Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@results); + } else { + Abort("No permission to view ticket"); + } } diff --git a/rt/share/html/Ticket/ModifyDates.html b/rt/share/html/Ticket/ModifyDates.html index c85d2f425..82c3ca807 100755 --- a/rt/share/html/Ticket/ModifyDates.html +++ b/rt/share/html/Ticket/ModifyDates.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/ModifyLinks.html b/rt/share/html/Ticket/ModifyLinks.html index 9dceb2a7a..72b636fc5 100755 --- a/rt/share/html/Ticket/ModifyLinks.html +++ b/rt/share/html/Ticket/ModifyLinks.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/ModifyPeople.html b/rt/share/html/Ticket/ModifyPeople.html index 56db2bb0c..9bfbae76c 100755 --- a/rt/share/html/Ticket/ModifyPeople.html +++ b/rt/share/html/Ticket/ModifyPeople.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Reminders.html b/rt/share/html/Ticket/Reminders.html index 8461efe44..5a7ebcdea 100755 --- a/rt/share/html/Ticket/Reminders.html +++ b/rt/share/html/Ticket/Reminders.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -50,6 +50,7 @@ % $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $Ticket); +<& /Elements/ListActions, actions => \@results &> <form action="<%RT->Config->Get('WebPath')%>/Ticket/Reminders.html" name="UpdateReminders" id="UpdateReminders" method="post"> <&|/Widgets/TitleBox, title => loc("Reminders"), class=>'ticket-info-reminders' @@ -65,7 +66,7 @@ <%INIT> my $Ticket = LoadTicket($id); -ProcessTicketReminders( TicketObj => $Ticket, ARGSRef => \%ARGS ); +my @results = ProcessTicketReminders( TicketObj => $Ticket, ARGSRef => \%ARGS ); </%INIT> <%ARGS> $id => undef diff --git a/rt/share/html/Ticket/ShowEmailRecord.html b/rt/share/html/Ticket/ShowEmailRecord.html index 55ee82338..bb754db34 100644 --- a/rt/share/html/Ticket/ShowEmailRecord.html +++ b/rt/share/html/Ticket/ShowEmailRecord.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html index 64bd531cf..26a37e80a 100755 --- a/rt/share/html/Ticket/Update.html +++ b/rt/share/html/Ticket/Update.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -278,31 +278,7 @@ $CanComment = 1 if ( $TicketObj->CurrentUserHasRight('CommentOnTicket') or $TicketObj->CurrentUserHasRight('ModifyTicket') ); -# deal with deleting uploaded attachments -foreach my $key (keys %ARGS) { - if ($key =~ m/^DeleteAttach-(.+)$/) { - delete $session{'Attachments'}{$1}; - } - $session{'Attachments'} = { %{$session{'Attachments'} || {}} }; -} - -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{$session{'Attachments'} || {}}, - $file_path => $attachment, - }; -} - -# delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) { - delete $session{'Attachments'}; -} +ProcessAttachments(ARGSRef => \%ARGS); my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS ); $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process', @@ -312,12 +288,8 @@ $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process', if ( $ARGS{'SubmitTicket'} ) { - my %checked = map {$_ => 1} grep {defined} - (ref $ARGS{'TxnSendMailTo'} eq "ARRAY" ? @{$ARGS{'TxnSendMailTo'}} - : defined $ARGS{'TxnSendMailTo'} ? ($ARGS{'TxnSendMailTo'}) : ()); - - my @squelchlist = grep {not $checked{$_}} split /,/, ($ARGS{'TxnRecipients'}||''); - $ARGS{'SquelchMailTo'} = \@squelchlist if @squelchlist; + my %squelched = ProcessTransactionSquelching( \%ARGS ); + $ARGS{'SquelchMailTo'} = [keys %squelched] if keys %squelched; my $CFs = $TicketObj->TransactionCustomFields; my $ValidCFs = $m->comp( diff --git a/rt/share/html/Ticket/autohandler b/rt/share/html/Ticket/autohandler index 47f87766f..6fa9998ea 100644 --- a/rt/share/html/Ticket/autohandler +++ b/rt/share/html/Ticket/autohandler @@ -1,3 +1,50 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2013 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> # Redirect to the approvals view if we're trying to get an approvals ticket # Exceptions: |