X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FUpdate.html;h=26a37e80adafe4eb9c10e57f614c6c4806ae50ec;hb=81ae0992cf8506c6a77485548ebde25eb946a9a9;hp=0d4e3b22399c5761e4d95754780d0b43206d1283;hpb=886d8d9970ccfe4eae1efe0c11160ad0c69c1339;p=freeside.git diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html index 0d4e3b223..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-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,11 +45,9 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title => $title &> -<& /Ticket/Elements/Tabs, - Ticket => $TicketObj, - Title=> $title &> - +<& /Elements/Header, Title => $title &> +<& /Elements/Tabs &> + % $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $TicketObj); <& /Elements/ListActions, actions => \@results &> @@ -62,79 +60,24 @@ <& /Elements/GnuPG/SignEncryptWidget:ShowIssues, self => $gnupg_widget &> +
+ <&|/Widgets/TitleBox, title => loc('Ticket and Transaction') &> % $m->callback(CallbackName => 'AfterTableOpens', ARGSRef => \%ARGS, Ticket => $TicketObj); - - - + % my $skip; % $m->callback( %ARGS, CallbackName => 'BeforeUpdateType', skip => \$skip ); % if (!$skip) {
% } - - - - - -<& /Ticket/Elements/UpdateCc, %ARGS, TicketObj => $TicketObj &> + -<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj &> +<& /Ticket/Elements/EditBasics, + TicketObj => $TicketObj, + InTable => 1, + fields => [ + { name => 'Status', + comp => '/Elements/SelectStatus', + args => { + Name => 'Status', + DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), + Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus), + TicketObj => $TicketObj, + QueueObj => $TicketObj->QueueObj, + onchange => 'changeStatus()' + }, + }, + { name => 'Resolve this Ticket on', + comp => '/Elements/SelectDate', + args => { + menu_prefix => 'WillResolve', + current => 0, + ShowTime => 0, + }, + }, + { name => 'Owner', + comp => '/Elements/SelectOwner', + args => { + Name => "Owner", + TicketObj => $TicketObj, + QueueObj => $TicketObj->QueueObj, + DefaultLabel => loc("[_1] (Unchanged)", $m->scomp('/Elements/ShowUser', User => $TicketObj->OwnerObj)), + Default => $ARGS{'Owner'} + } + }, + { name => 'Worked', + comp => '/Elements/EditTimeValue', + args => { + Name => 'UpdateTimeWorked', + Default => $ARGS{UpdateTimeWorked}||'', + InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'}||'minutes', + } + }, + ] +&> -% if (exists $session{'Attachments'}) { - - - -% } # end of if + - +% $m->callback( %ARGS, CallbackName => 'AfterWorked', Ticket => $TicketObj ); + +<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, AsTable => 1 &> + + + + + +
+ <& /Ticket/Elements/ShowSimplifiedRecipients, TicketObj => $TicketObj, %ARGS &> + + <&|/Widgets/TitleBox, title => loc('Message'), class => 'messagedetails' &> +
<&|/l&>Status: - -<& /Elements/SelectStatus, - Name=>"Status", - DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), - Default => $ARGS{'Status'} - || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus, - onchange => 'changeStatus()' -)&> -<&|/l&>Resolve this Ticket on: -<& /Elements/SelectDate, - menu_prefix => 'WillResolve', - current => 0, - ShowTime => 0, -&> -% if ( $TicketObj->WillResolve ) { - (<% $TicketObj->WillResolveObj->AsString %>) -% } - - - - - - <& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, UILocation => 'TimeWorked', &> -
<&|/l&>Worked:<& /Elements/EditTimeValue, - Name => 'UpdateTimeWorked', - Default => $ARGS{UpdateTimeWorked}||'', - InUnits => $ARGS{'UpdateTimeWorked-TimeUnits'}||'minutes', -&> -
<&|/l&>Owner:<& /Elements/SelectOwner, - Name => "Owner", - TicketObj => $TicketObj, - QueueObj => $TicketObj->QueueObj, - DefaultLabel => loc("[_1] (Unchanged)", $m->scomp('/Elements/ShowUser', User => $TicketObj->OwnerObj)), - Default => $ARGS{'Owner'} -&>
<&|/l&>Update Type: + + + % $m->callback( %ARGS, CallbackName => 'AfterUpdateType' );
<&|/l&>Subject: -% $m->callback( %ARGS, CallbackName => 'AfterSubject' ); -
<&|/l&>Attached file: -<&|/l&>Check box to delete
-% foreach my $attach_name (keys %{$session{'Attachments'}}) { -<%$attach_name%>
-% } # end of foreach -
<&|/l&>Attach: -
+<& /Ticket/Elements/UpdateCc, %ARGS, TicketObj => $TicketObj &> % if ( $gnupg_widget ) { + + + -
  @@ -176,7 +195,13 @@ changeStatus(); % } % $m->callback( %ARGS, CallbackName => 'AfterGnuPG' ); -
<&|/l&>Message: +
<&|/l&>Subject: +% $m->callback( %ARGS, CallbackName => 'AfterSubject' ); +
<&|/l&>Message: +<& /Articles/Elements/BeforeMessageBox, %ARGS &> % $m->callback( %ARGS, CallbackName => 'BeforeMessageBox' ); % if (exists $ARGS{UpdateContent}) { % # preserve QuoteTransaction so we can use it to set up sane references/in/reply to @@ -189,25 +214,32 @@ changeStatus(); % $IncludeSignature = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment'); <& /Elements/MessageBox, Name=>"UpdateContent", IncludeSignature => $IncludeSignature, %ARGS &> % } +% $m->callback( %ARGS, CallbackName => 'AfterMessageBox' );
- + <& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $TicketObj &> + + + <& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket', id => 'SubmitTicket' &> -<& /Elements/Submit, Label => loc('Update Ticket'), Name => 'SubmitTicket' &> % if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) { -<&|/Widgets/TitleBox, title => loc('Scrips and Recipients') &> -<& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &> - + <&|/Widgets/TitleBox, title => loc('Scrips and Recipients'), id => 'previewscrips', rolledup => RT->Config->Get('SimplifiedRecipients', $session{'CurrentUser'}) &> + <& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &> + +% } +
+% if (my $recips = $m->notes("DryRun-Recipients-".$TicketObj->Id)) { +" /> % } + +
<%INIT> my $CanRespond = 0; my $CanComment = 0; my $checks_failure = 0; -my $title; my $TicketObj = LoadTicket($id); @@ -219,17 +251,7 @@ unless($DefaultStatus){ $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status()); } -unless (RT->Config->Get('SuppressAutoOpenOnUpdate', $session{'CurrentUser'})) { - if ($DefaultStatus eq 'new') { - $DefaultStatus = 'open'; - } -} - -if ($DefaultStatus eq 'resolved') { - $title = loc("Resolve ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject); -} else { - $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject); -} +my $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject||''); # Things needed in the template - we'll do the processing here, just # for the convenience: @@ -243,6 +265,10 @@ if ($Action ne 'Respond') { $ResponseDefault = qq[ selected="selected"]; } +my $type = $ARGS{'UpdateType'} ? $ARGS{'UpdateType'} : + lc $ARGS{'Action'} eq 'respond' ? 'response' : + lc $ARGS{'Action'} eq 'comment' ? 'private' : + 'none' ; $CanRespond = 1 if ( $TicketObj->CurrentUserHasRight('ReplyToTicket') or @@ -252,34 +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 ($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', @@ -288,6 +287,10 @@ $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process', ); if ( $ARGS{'SubmitTicket'} ) { + + my %squelched = ProcessTransactionSquelching( \%ARGS ); + $ARGS{'SquelchMailTo'} = [keys %squelched] if keys %squelched; + my $CFs = $TicketObj->TransactionCustomFields; my $ValidCFs = $m->comp( '/Elements/ValidateCustomFields',