% foreach my $key ( keys %search ) {
% my @values = ref($search{$key}) ? @{$search{$key}} : ( $search{$key} );
% foreach my $value ( @values ) {
- <INPUT TYPE="hidden" NAME="<% $key |h %>" VALUE="<% $value |h %>">
+ <INPUT TYPE="hidden" NAME="<% $key %>" VALUE="<% $value %>">
% }
% }
<INPUT TYPE="hidden" NAME="html_body" VALUE="<% $cgi->param('html_body') |h %>">
<TR>
<TD ALIGN="right" VALIGN="top">Message (HTML display): </TD>
- <TD BGCOLOR="#e8e8e8" ALIGN="left"><% $cgi->param('html_body') %></TD>
+ <TD CLASS="background" ALIGN="left"><% $cgi->param('html_body') %></TD>
</TR>
% my $text_body = HTML::FormatText->new(leftmargin=>0)->format(
<INPUT TYPE="hidden" NAME="text_body" VALUE="<% $text_body |h %>">
<TR>
<TD ALIGN="right" VALIGN="top">Message (Text display): </TD>
- <TD BGCOLOR="#e8e8e8" ALIGN="left"><PRE><% $text_body %></PRE></TD>
+ <TD CLASS="background" ALIGN="left"><PRE><% $text_body %></PRE></TD>
</TR>
</TABLE>
my %search = $cgi->Vars;
delete $search{$_} for qw( magic from subject html_body text_body );
$search{$_} = [ split(/\0/, $search{$_}) ]
- foreach grep $search{$_} =~ /\0/, keys %search;
+ foreach grep { $_ eq 'payby' || $search{$_} =~ /\0/ } keys %search;
my $title = 'Bulk send customer notices';
my $num_cust;
if ( $cgi->param('magic') eq 'preview' ) {
- my $sql_query = FS::cust_main->search_sql(\%search);
+ my $sql_query = FS::cust_main->search(\%search);
my $count_query = delete($sql_query->{'count_query'});
my $count_sth = dbh->prepare($count_query)
or die "Error preparing $count_query: ". dbh->errstr;