X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FUpdate.html;h=37bb134c207b8d61c3fea16fd787978f0f9dcf93;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=64bd531cf3bd7487e476c4777099edd92ca346d9;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html index 64bd531cf..37bb134c2 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-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -172,7 +172,7 @@ changeStatus(); % $m->callback( %ARGS, CallbackName => 'AfterWorked', Ticket => $TicketObj ); -<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, AsTable => 1 &> +<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, AsTable => 1, KeepValue => 1 &> @@ -221,8 +221,12 @@ changeStatus(); +% $m->callback( %ARGS, CallbackName => 'BeforeSubmit', Ticket => $TicketObj ); + <& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket', id => 'SubmitTicket' &> +% $m->callback( %ARGS, CallbackName => 'BeforeScrips', Ticket => $TicketObj ); + % if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) { <&|/Widgets/TitleBox, title => loc('Scrips and Recipients'), id => 'previewscrips', rolledup => RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'}) &> <& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &> @@ -230,12 +234,17 @@ changeStatus(); % } +% $m->callback( %ARGS, CallbackName => 'AfterScrips', Ticket => $TicketObj ); + % if (my $recips = $m->notes("DryRun-Recipients-".$TicketObj->Id)) { " /> % }
+ +% $m->callback( %ARGS, CallbackName => 'AfterForm', Ticket => $TicketObj ); + <%INIT> my $CanRespond = 0; my $CanComment = 0; @@ -278,31 +287,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 +297,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(