diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-05-03 15:40:42 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-05-03 15:40:42 -0400 |
commit | 35d34f06298d62aac3d4d9a2b486a2759d6d4952 (patch) | |
tree | d0a0dcdf30aa741365c59bc2d20cd09566c34bc8 /httemplate/config/config-process.cgi | |
parent | d263897b2b9247340901f93c57f44c7f85d87d37 (diff) |
RT# 78131 - added ability to use message template for auto payment receipt and fixed NaN error when selecting nothing for config items with type select.
Diffstat (limited to 'httemplate/config/config-process.cgi')
-rw-r--r-- | httemplate/config/config-process.cgi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index 3d57b310c..d84edce00 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -75,7 +75,7 @@ configCell.innerHTML = <% $value |js_string %>; % } elsif ( $type eq 'select-sub' && ! $i->multiple ) { configCell.innerHTML = - <% $conf->config($i->key, $agentnum) |js_string %> + ': ' + + <% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' |js_string %> + ': ' + <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) |js_string %>; % } else { //alert('unknown type <% $type %>'); @@ -164,7 +164,7 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { or ( $type =~ /^select(-(sub|part_svc|part_pkg|pkg_class|agent))?$/ || $i->multiple ) ) { - if ( scalar(@{[ $cgi->param($i->key.$n) ]}) ) { + if ( scalar(@{[ $cgi->param($i->key.$n) ]}) && $cgi->param($i->key.$n) ne '' ) { my $error = &{$i->validate}([ $cgi->param($i->key.$n) ], $n) if $i->validate; push @error, $error if $error; $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum); |