[freeside-commits] freeside/httemplate/config config.cgi, 1.29, 1.30 config-process.cgi, 1.15, 1.16 config-view.cgi, 1.25, 1.26
Ivan,,,
ivan at wavetail.420.am
Fri Apr 17 01:02:31 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/config
In directory wavetail.420.am:/tmp/cvs-serv11308
Modified Files:
config.cgi config-process.cgi config-view.cgi
Log Message:
show labels for select(select_hash) config options, RT#3997
Index: config-process.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-process.cgi,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- config-process.cgi 9 Feb 2009 14:05:31 -0000 1.15
+++ config-process.cgi 17 Apr 2009 08:02:29 -0000 1.16
@@ -87,6 +87,15 @@
configCell.style.backgroundColor = '#ff0000';
configCell.innerHTML = 'NO';
% }
+% } 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 };
+% }
+ configCell.innerHTML = <% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' |js_string %>;
+
% } elsif ( $type eq 'text' || $type eq 'select' ) {
configCell.innerHTML = <% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' |js_string %>;
% } elsif ( $type eq 'select-sub' ) {
Index: config-view.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-view.cgi,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- config-view.cgi 17 Mar 2009 09:58:17 -0000 1.25
+++ config-view.cgi 17 Apr 2009 08:02:29 -0000 1.26
@@ -66,7 +66,7 @@
<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 @@
</td>
</tr>
-% } elsif ( $type eq 'binary' ) {
+% } elsif ( $type eq 'binary' ) {
<tr>
<td>
@@ -112,17 +112,36 @@
</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 @@
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
</td>
</tr>
+
% } else {
<tr><td>
Index: config.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config.cgi,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- config.cgi 9 Feb 2009 14:05:31 -0000 1.29
+++ config.cgi 17 Apr 2009 08:02:29 -0000 1.30
@@ -84,11 +84,9 @@
% '' => '', map { $_ => $_ } @{ $config_item->select_enum };
% } elsif ( $config_item->select_hash ) {
% if ( ref($config_item->select_hash) eq 'ARRAY' ) {
-% tie %hash, 'Tie::IxHash',
-% '' => '', @{ $config_item->select_hash };
+% tie %hash, 'Tie::IxHash', '' => '', @{ $config_item->select_hash };
% } else {
-% tie %hash, 'Tie::IxHash',
-% '' => '', %{ $config_item->select_hash };
+% tie %hash, 'Tie::IxHash', '' => '', %{ $config_item->select_hash };
% }
% } else {
% %hash = ( '' => 'WARNING: neither select_enum nor select_hash specified in Conf.pm for configuration option "'. $key. '"' );
More information about the freeside-commits
mailing list