-Send to contacts:
- <& /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
- },
- &>
+<TABLE CELLSPACING=0 id="send_to_contacts_table">
+<TR>
+ <TD>Send to contacts:</TD>
+ <TD>
+ <div id="contactclassesdiv">
+ <& /elements/checkboxes.html,
+ 'style' => 'display: inline; vertical-align: top',
+ 'disable_links' => 1,
+ 'names_list' => \@optin_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) = @_;
+ exists $dest_ischecked{$name};
+ },
+ &>
+ </div>
+% if ($send_to_domain) {
+ <div>
+ <INPUT TYPE="checkbox" NAME="emailtovoice" ID="emailtovoice" VALUE="ON" onclick="toggleDiv(this)">Email to voice
+ </div>
+ <div id="emailtovoicediv" style="display:none";>
+
+ <& /elements/select-cust_phone.html,
+ 'cust_num' => $cgi->param('custnum'),
+ 'field_name' => 'emailtovoice_contact',
+ 'format' => 'xxxxxxxxxx',
+ 'phone_types' => [ 'daytime', 'night', 'fax', 'mobile' ],
+ &>@<% $send_to_domain |h %>
+ </div>
+% }
+ </TD>
+% if (@active_classes) {
+</tr>
+<tr>
+<TD>Contact Type:</TD>
+<TD>
+ <div id="contactclassesdiv">
+ <& /elements/checkboxes.html,
+ 'style' => 'display: inline; vertical-align: top',
+ 'disable_links' => 1,
+ 'names_list' => \@classnum_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) = @_;
+ exists $classnum_ischecked{$name};
+ },
+ &>
+ </div>
+</TD>
+% }
+</TR>
+</TABLE>