X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-process.cgi;fp=httemplate%2Fconfig%2Fconfig-process.cgi;h=d84edce0043f270b36263c71360041c722a1dee6;hp=3d57b310cf8398838a22886b0ea48acc5687a2d3;hb=35d34f06298d62aac3d4d9a2b486a2759d6d4952;hpb=d263897b2b9247340901f93c57f44c7f85d87d37 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);