diff options
author | Mitch Jackson <mitch@freeside.biz> | 2018-01-28 02:41:17 -0600 |
---|---|---|
committer | Mitch Jackson <mitch@freeside.biz> | 2018-01-28 02:41:17 -0600 |
commit | 4747bfbea3f4abb66d05a2bd1abed69e28a4aa3d (patch) | |
tree | 646bcf2030c67ab96140c12a75b2266d55f9975f /httemplate | |
parent | 1a4faacda4f3affc6060e9f539bd3ae6c71408f7 (diff) |
RT# 73421 Fixed E-Mail pipeline to obey contact opt-in flags
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/email-customers.html | 27 | ||||
-rw-r--r-- | httemplate/view/cust_main/contacts_new.html | 2 |
2 files changed, 17 insertions, 12 deletions
diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html index fe637abe1..dc53f6d55 100644 --- a/httemplate/misc/email-customers.html +++ b/httemplate/misc/email-customers.html @@ -171,16 +171,18 @@ Template: <TD>Send to contacts:</TD> <TD> <div id="contactclassesdiv"> - <& /elements/checkboxes.html, - 'style' => 'display: inline; vertical-align: top', - 'disable_links' => 1, - 'names_list' => \@contact_checkboxes, - 'element_name_prefix' => 'contact_class_', - 'checked_callback' => sub { - my($cgi, $name) = @_; - $name eq 'invoice' #others default to unchecked - }, - &> + <& /elements/checkboxes.html, + 'style' => 'display: inline; vertical-align: top', + 'disable_links' => 1, + 'names_list' => \@contact_checkboxes, + 'element_name_prefix' => 'contact_class_', + 'checked_callback' => sub { + # Called for each checkbox + # Return true to default as checked, false as unchecked + my($cgi, $name) = @_; + $name eq 'message' + }, + &> </div> % if ($send_to_domain) { <div> @@ -422,6 +424,8 @@ if ( !$cgi->param('preview') ) { push @contact_classnum, $1; if ( $1 eq 'invoice' ) { push @contact_classname, 'Invoice recipients'; + } elsif ( $1 eq 'message' ) { + push @contact_classname, 'Message recipients'; } else { my $contact_class = FS::contact_class->by_key($1); push @contact_classname, encode_entities($contact_class->classname); @@ -432,7 +436,8 @@ if ( !$cgi->param('preview') ) { } my @contact_checkboxes = ( - [ 'invoice' => { label => 'Invoice recipients' } ] + [ 'message' => { label => 'Message recipients' } ], + [ 'invoice' => { label => 'Invoice recipients' } ], ); foreach my $class (qsearch('contact_class', { disabled => '' })) { diff --git a/httemplate/view/cust_main/contacts_new.html b/httemplate/view/cust_main/contacts_new.html index a28b44934..fe412cc00 100644 --- a/httemplate/view/cust_main/contacts_new.html +++ b/httemplate/view/cust_main/contacts_new.html @@ -10,8 +10,8 @@ <%$th%>Contact</TH> <%$th%>Email</TH> <%$th%>Send invoices</TH> - <%$th%>Self-service</TH> <%$th%>Send messages</TH> + <%$th%>Self-service</TH> % foreach my $phone_type (@phone_type) { <%$th%><% $phone_type->typename |h %></TH> % } |