diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-05-08 12:50:23 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-05-08 12:50:23 -0700 |
| commit | aa20afbcdd752835076600f1ba8dc3e173efe523 (patch) | |
| tree | 456519daf3f0697410b04f02b493f0625890a1c3 /httemplate | |
| parent | 4f1f53a0b57e501794eb5262f284c6b88ae7e677 (diff) | |
| parent | 35d34f06298d62aac3d4d9a2b486a2759d6d4952 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate')
| -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); |
