diff options
author | ivan <ivan> | 2009-04-17 08:02:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-04-17 08:02:29 +0000 |
commit | 6a1d3fe46f65b0a24ec025c22afcdb75af3c9e9a (patch) | |
tree | 5d97d9027d2b55a797aeba09adf2f12b6ce538c7 /httemplate/config/config-view.cgi | |
parent | 3e51d644757efe3ffa7eff41e50adfcb4b5e62e7 (diff) |
show labels for select(select_hash) config options, RT#3997
Diffstat (limited to 'httemplate/config/config-view.cgi')
-rw-r--r-- | httemplate/config/config-view.cgi | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index f2ae892a6..41ecfd268 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -66,7 +66,7 @@ Click on a configuration value to change it. <td><font color="#ff0000">no type</font></td> </tr> -% } elsif ( $type eq 'image' ) { +% } elsif ( $type eq 'image' ) { <tr> <td bgcolor='#ffffff'> @@ -86,7 +86,7 @@ Click on a configuration value to change it. </td> </tr> -% } elsif ( $type eq 'binary' ) { +% } elsif ( $type eq 'binary' ) { <tr> <td> @@ -112,17 +112,36 @@ Click on a configuration value to change it. </pre></font> </td> </tr> + % } elsif ( $type eq 'checkbox' ) { <tr> <td id="<% $i->key.$n %>" bgcolor="#<% $conf->exists($i->key, $agentnum) ? '00ff00">YES' : 'ff0000">NO' %></td> </tr> + +% } elsif ( $type eq 'select' && $i->select_hash ) { +% +% my %hash; +% if ( ref($i->select_hash) eq 'ARRAY' ) { +% tie %hash, 'Tie::IxHash', '' => '', @{ $i->select_hash }; +% } else { +% tie %hash, 'Tie::IxHash', '' => '', %{ $i->select_hash }; +% } + + <tr> + <td id="<% $i->key.$n %>" bgcolor="#ffffff"> + <% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' %> + </td> + </tr> + % } elsif ( $type eq 'text' || $type eq 'select' ) { <tr> <td id="<% $i->key.$n %>" bgcolor="#ffffff"> <% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %> - </td></tr> + </td> + </tr> + % } elsif ( $type eq 'select-sub' ) { <tr> @@ -131,6 +150,7 @@ Click on a configuration value to change it. <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %> </td> </tr> + % } else { <tr><td> |