X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Femail-customers.html;h=0ed5ef380ed2b20ee3884df714aae728e0fa57f0;hb=f93d758f59bf0e7be4293a57ed6e8c6ba2c7a7fe;hp=d086c676d4a0afb679b82f0a7f6a2fc00192b0e4;hpb=4b05b20576ddb14577d59c87c8257c6804449410;p=freeside.git
diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html
index d086c676d..0ed5ef380 100644
--- a/httemplate/misc/email-customers.html
+++ b/httemplate/misc/email-customers.html
@@ -67,8 +67,8 @@ from/subject/body cgi params
% # kludge these through hidden inputs because they're not really part
% # of the template, but should be sticky during draft editing
-
-
+
+
% if ( !$msg_template->disabled ) {
<& /elements/tr-td-label.html, 'label' => 'Template:' &>
@@ -153,13 +153,13 @@ function toggle(obj) {
% # if we've already established a draft template, don't let msgnum be changed
<& /elements/hidden.html,
field => 'msgnum',
- curr_value => ($cgi->param('msgnum') || ''),
+ curr_value => ( scalar($cgi->param('msgnum')) || ''),
&>
% } else {
Template:
<& /elements/select-msg_template.html,
onchange => 'toggle(this)',
- curr_value => ($cgi->param('msgnum') || ''),
+ curr_value => ( scalar($cgi->param('msgnum')) || ''),
&>
% }
@@ -184,14 +184,14 @@ Send to contacts:
'value' => $conf->config('invoice_from_name', $agent_virt_agentnum) ||
$conf->config('company_name', $agent_virt_agentnum), #?
'size' => 20,
- 'curr_value' => $cgi->param('from_name'),
+ 'curr_value' => scalar($cgi->param('from_name')),
&> <\
<& /elements/input-text.html,
'field' => 'from_addr',
'type' => 'email', # HTML5, woot
'value' => $conf->config('invoice_from', $agent_virt_agentnum),
'size' => 20,
- 'curr_value' => $cgi->param('from_addr'),
+ 'curr_value' => scalar($cgi->param('from_addr')),
&>>
<& /elements/tr-input-text.html,
@@ -355,13 +355,19 @@ if ( !$cgi->param('preview') ) {
my $cust_msg = $msg_template->prepare(%msgopts);
$from = $cust_msg->env_from;
$html_body = $cust_msg->preview;
- if ( $cust_msg->header =~ /^subject: (.*)/mi ) {
+#hmm. this came in with the #37098 rewrite, but isn't on v3 :/
+# causing problems with mangling subject of unrelated things
+# should probably decode instead of ignore the UTF-8 thing, but
+# this at least masks the ugliness for now :/
+ if ( $cust_msg->header =~ /^subject: (.*)/mi && $1 !~ /^\=\?UTF-8/ ) {
$subject = $1;
}
}
# contact_class_X params
- foreach my $param ( $cgi->multi_param ) {
+ #we can't switch to multi_param until we're done supporting deb 7
+ local($CGI::LIST_CONTEXT_WARN) = 0;
+ foreach my $param ( $cgi->param ) {
if ( $param =~ /^contact_class_(\w+)$/ ) {
push @contact_classnum, $1;
if ( $1 eq 'invoice' ) {