X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig.cgi;h=50b3eba85dd3c47323d2b2c8dcf501f7f3c78f22;hp=c2b3e6d3c4774c68c41e3f2427f3f022574ee117;hb=a2ecb1cf6a6c084c521710f1256da082f70ba9e5;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index c2b3e6d3c..50b3eba85 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -24,6 +24,7 @@ function SafeOnsubmit() {
+ Setting <% $key %> @@ -39,17 +40,20 @@ Setting <% $key %>
% my $n = 0; +% my $submit = 0; % foreach my $type (@types) { % if ( $type eq '' ) { no type % } elsif ( $type eq 'image' ) { +% $submit++; <% $conf->exists($key, $agentnum) ? 'Current image
'. '
' + ';agentnum='. $agentnum. + ';locale='. $locale .'">
' : '' %> @@ -57,24 +61,37 @@ Setting <% $key %> New image filename "> % } elsif ( $type eq 'binary' ) { +% $submit++; Filename "> % } elsif ( $type eq 'textarea' ) { +% $submit++; % } elsif ( $type eq 'checkbox' ) { +% +% if ( $agentnum && $conf->exists($key) && ! $agent_bool ) { - " type="checkbox" value="1" - <% $conf->exists($key, $agentnum) ? 'CHECKED' : '' %> > + " type="checkbox" value="1" CHECKED DISABLED> + (global setting cannot yet be overridden) -% } elsif ( $type eq 'text' ) { +% } else { +% $submit++; - " type="text" value="<% $conf->exists($key, $agentnum) ? $conf->config($key, $agentnum) : '' |h %>"> + " type="checkbox" value="1" + <% $conf->config_bool($key, $agentnum) ? 'CHECKED' : '' %> > +% } + +% } elsif ( $type eq 'text' ) { +% $submit++; -% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { + " type="text" value="<% $conf->exists($key, $agentnum) ? $conf->config($key, $agentnum) : '' |h %>"> +% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { +% $submit++; + -% } elsif ( $type eq 'select-sub' ) { +% } elsif ( $type eq 'select-sub' ) { +% $submit++; - " <% $config_item->multiple ? 'MULTIPLE' : '' %>> + +% unless ( $config_item->multiple ) { +