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=056919790584c98e69ba2b5ffcfc99a58fa77004;hp=f8b64e86f3abca25ddd43849a01a7a323be44cde;hb=81e426fe755eaea508041bc2d7b25ac44c777434;hpb=25b0525eb1f0d018b893a7bdc96b92a8f446020f diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index f8b64e86f..056919790 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -41,15 +41,18 @@ foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { } else { push @delete, $i->key; } - } elsif ( $type eq 'text' || $type eq 'select' || $type eq 'select-sub' ) { - if ( $cgi->param($i->key.$n) ne '' ) { - $conf->set($i->key, $cgi->param($i->key.$n), $agentnum); + } elsif ( $type =~ /^(editlist|selectmultiple)$/ + or ( $type =~ /^select(-(sub|part_svc))?$/ || $i->multiple ) + ) + { + if ( scalar(@{[ $cgi->param($i->key.$n) ]}) ) { + $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum); } else { $conf->delete($i->key, $agentnum); } - } elsif ( $type eq 'editlist' || $type eq 'selectmultiple' ) { - if ( scalar(@{[ $cgi->param($i->key.$n) ]}) ) { - $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum); + } elsif ( $type =~ /^(text|select(-(sub|part_svc))?)$/ ) { + if ( $cgi->param($i->key.$n) ne '' ) { + $conf->set($i->key, $cgi->param($i->key.$n), $agentnum); } else { $conf->delete($i->key, $agentnum); } @@ -101,6 +104,11 @@ $conf->delete($_, $agentnum) foreach @delete; % } elsif ( $type eq 'text' || $type eq 'select' ) { configCell.innerHTML = <% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' |js_string %>; +% } elsif ( $type eq 'select-part_svc' && ! $i->multiple ) { + configCell.innerHTML = + <% $conf->config($i->key, $agentnum) |js_string %> +%# + ': ' + +%# <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) |js_string %>; % } elsif ( $type eq 'select-sub' ) { configCell.innerHTML = <% $conf->config($i->key, $agentnum) |js_string %> + ': ' +