+ @payby );
+}
+
+my (@act_head, @act_blank, @act_fields, $act_align, $html_foot);
+if (delete($opt{'email_checkboxes'})) {
+ my $email_link = q!var url = toCGIString(); !;
+ $email_link .= q/if (!url) { alert('No customers selected'); return false; }; /;
+ $email_link .= q!url = '!;
+ $email_link .= "${p}misc/email-customers.html?table=cust_main";
+ $email_link .= q!' + url + '&popup=1&url=javascript%3Awindow.top.location.reload%28%29%3B'; !;
+ $email_link .= include('/elements/popup_link_onclick.html',
+ 'js_action' => 'url',
+ 'actionlabel' => 'Send Customer Email',
+ 'width' => '900',
+ 'height' => '500',
+ );
+ $html_foot = include('checkbox-foot.html',
+ label => 'Email selected customers',
+ onclick => $email_link,
+ );
+ push @act_fields, sub {
+ my $row = shift;
+ my $custnum = $row->custnum;
+ qq!<input type="checkbox" name="custnum" value="$custnum">!;
+ };
+ $act_align = 'l';
+ push @act_head, {nodownload => 1};
+ push @act_blank, '';