X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FShowSimplifiedRecipients;h=85aad45d81ab8ce0254550a76b5689ac5702a6b1;hp=590006b535f601e0d8211ddbbe83663836cd65ce;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 diff --git a/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients b/rt/share/html/Ticket/Elements/ShowSimplifiedRecipients index 590006b53..85aad45d8 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-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -64,25 +64,18 @@ if ($Object->Scrips) { } } } -if ($Object->Rules) { - for my $rule (grep {$_->{hints} and $_->{hints}{class} eq "SendEmail"} @{$Object->Rules}) { - for my $type (qw(To Cc Bcc)) { - $headers{$type}{$_} ||= @{[Email::Address->parse($_)]}[0] # Hate list context - for @{$rule->{hints}{recipients}{$type}}; - } - } -} my %recips; +my %squelched = ProcessTransactionSquelching( \%ARGS ); <&|/Widgets/TitleBox, title => loc('Recipients'), id => 'recipients' &> - % for my $type (qw(To Cc Bcc)) { % next unless keys %{$headers{$type}}; + % } +% $m->callback( CallbackName => 'AfterRecipients', TicketObj => $TicketObj );
<% $type %>: % 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}++; value="<%$addr->address%>" id="TxnSendMailTo-<% $addr->address %>-<% $recips{$addr->address} %>" /> @@ -92,9 +85,11 @@ my %recips; % }
-(Uncheck boxes to disable notifications to the listed -recipients. Does not change who will receive future -updates.) +

+<&|/l, RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$TicketObj->Id, +&>Uncheck boxes to disable notifications to the listed recipients for this transaction only; persistent squelching is managed on the People page. +

% $m->notes("DryRun-Recipients-".$TicketObj->Id, \%recips);