AFFERO BITCHES
[freeside.git] / httemplate / config / config-view.cgi
index 0f5fd62..41ecfd2 100644 (file)
@@ -66,25 +66,35 @@ 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>
-
-              <% $conf->exists($i->key, $agentnum)
-                   ? '<img src="config-image.cgi?key='.      $i->key.
-                                               ';agentnum='. $agentnum. '">'
-                   : 'empty'
-              %>
+              <td bgcolor='#ffffff'>
+                <% $conf->exists($i->key, $agentnum)
+                     ? '<img src="config-image.cgi?key='.      $i->key.
+                                                 ';agentnum='. $agentnum. '">'
+                     : 'empty'
+                %>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <% $conf->exists($i->key, $agentnum)
+                     ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
+                     : ''
+                %>
+              </td>
             </tr>
 
-%   } elsif (   $type eq 'binary' ) {
+%   } elsif ( $type eq 'binary' ) {
 
             <tr>
-
-              <% $conf->exists($i->key, $agentnum)
-                   ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
-                   : 'empty'
-              %>
+              <td>
+                <% $conf->exists($i->key, $agentnum)
+                     ? qq!<a href="config-download.cgi?key=!. $i->key. ';agentnum='. $agentnum. qq!">download</a>!
+                     : 'empty'
+                %>
+              </td>
             </tr>
 
 %   } elsif (    $type eq 'textarea'
@@ -102,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>
@@ -121,6 +150,7 @@ Click on a configuration value to change it.
                 <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
               </td>
             </tr>
+
 %   } else { 
 
             <tr><td>