diff options
Diffstat (limited to 'httemplate/config/config.cgi')
-rw-r--r-- | httemplate/config/config.cgi | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index b9e84a8d5..f640d0b5e 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -30,6 +30,16 @@ <input name="<%= $i->key. $n %>" type="checkbox" value="1"<%= $conf->exists($i->key) ? ' CHECKED' : '' %>> <% } elsif ( $type eq 'text' ) { %> <input name="<%= $i->key. $n %>" type="<%= $type %>" value="<%= $conf->exists($i->key) ? $conf->config($i->key) : '' %>"> + <% } elsif ( $type eq 'select' ) { %> + <select name="<%= $i->key. $n %>"> + <% my %saw; + foreach my $value ( "", @{$i->select_enum} ) { + local($^W)=0; next if $saw{$value}++; %> + <option value="<%= $value %>"<%= $value eq $conf->config($i->key) ? ' SELECTED' : '' %>><%= $value %> + <% } %> + <% if ( $conf->exists($i->key) && $conf->config($i->key) && ! grep { $conf->config($i->key) eq $_ } @{$i->select_enum}) { %> + <option value=<%= $conf->config($i->key) %> SELECTED><%= conf->config($i->key) %> + <% } %> <% } else { %> <font color="#ff0000">unknown type <%= $type %></font> <% } %> |