summaryrefslogtreecommitdiff
path: root/httemplate/config/config-process.cgi
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-05-03 15:40:42 -0400
committerChristopher Burger <burgerc@freeside.biz>2018-05-04 09:58:41 -0400
commitf394ef58c444b753ea9508a02593ce38f012e5d4 (patch)
tree48d2f871a27280a2f10546a43ffa8b2afd2f5be9 /httemplate/config/config-process.cgi
parent1e0b0cfabb4503438a3de0597db7562cb71327d7 (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.cgi4
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);