X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig.cgi;h=50b3eba85dd3c47323d2b2c8dcf501f7f3c78f22;hb=7d80f005462758e0271215240cdf99a9336f03dd;hp=485565e8009b5b5c342b2f278a483d3f45aa543f;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index 485565e80..50b3eba85 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -20,44 +20,78 @@ function SafeOnsubmit() { } -% if ( $cgi->param('error') ) { - Error: <% $cgi->param('error') %> -

-% } +<% include('/elements/error.html') %>
+ -Setting <% $key %> +Setting <% $key %> + +% my $description_printed = 0; +% if ( grep $_ eq 'textarea', @types ) { +% $description_printed = 1; + + - <% $description %> + +% }
% my $n = 0; -% foreach my $type ( ref($config_item->type) ? @{$config_item->type} : $config_item->type ) { +% my $submit = 0; +% foreach my $type (@types) { % if ( $type eq '' ) { no type +% } elsif ( $type eq 'image' ) { +% $submit++; + + <% $conf->exists($key, $agentnum) + ? 'Current image
'. + '
' + : '' + %> + +
+ 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) : '' %>"> + " 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 ) { +