%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
}
}
}
-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 );
</%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} %>" />
% }
</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
-updates.)</i>
+<p>
+<&|/l, RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$TicketObj->Id,
+&>Uncheck boxes to disable notifications to the listed recipients <b>for this transaction only</b>; persistent squelching is managed on the <a href="[_1]">People page</a>.</&>
+</p>
</&>
% $m->notes("DryRun-Recipients-".$TicketObj->Id, \%recips);