<% include('/elements/popup_link.html',
@@ -65,102 +85,178 @@ Click on a configuration value to change it.
'width' => $width,
'height' => $height,
'actionlabel' => 'Enter configuration value',
- 'label' => ''. $i->key. '',
- 'aname' => $i->key,
+ 'label' => "$label",
+ 'aname' => $i->key, #agentnum
+ # if $cgi->param('showagent')?
)
%>: <% $i->description %>
|
+
+% my $n = 0;
% foreach my $type (@types) {
-% my $n = 0;
-% if ( $type eq '' ) {
+
+% if ( $type eq '' ) {
no type |
-% } elsif ( $type eq 'binary' ) {
+
+% } elsif ( $type eq 'image' ) {
- <% $conf->exists($i->key, $agentnum)
- ? qq!download!
- : 'empty'
- %>
+
+ <% $conf->exists($i->key, $agentnum)
+ ? ''
+ : 'empty'
+ %>
+ |
+
+
+
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!download!
+ : ''
+ %>
+ |
-% } elsif ( $type eq 'textarea'
-% || $type eq 'editlist'
-% || $type eq 'selectmultiple' ) {
+
+% } elsif ( $type eq 'binary' ) {
-
-
-<% encode_entities(join("\n",
+
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!download!
+ : 'empty'
+ %>
+ |
+ |
+
+% } elsif ( $type eq 'textarea'
+% || $type eq 'editlist'
+% || $type eq 'selectmultiple' ) {
+
+
+
+<% encode_entities(join("\n",
map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
$conf->config($i->key, $agentnum)
) )
-%>
-
+%>
|
-% } elsif ( $type eq 'checkbox' ) {
+
+% } elsif ( $type eq 'checkbox' ) {
- YES' : 'ff0000">NO' %> |
+ YES' : 'ff0000">NO' %> |
-% } elsif ( $type eq 'text' || $type eq 'select' ) {
+
+% } 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 };
+% }
+
+
+
+ <% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' %>
+ |
+
+
+% } elsif ( $type eq 'text' || $type eq 'select' ) {
-
+ |
<% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %>
- |
-% } elsif ( $type eq 'select-sub' ) {
+
+
+
+% } elsif ( $type eq 'select-sub' ) {
-
+ |
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
|
-% } else {
+
+% } else {
unknown type <% $type %>
|
+% }
+% $n++;
% }
-% $n++; }
|
-% }
+
+% } # foreach my $agentnum
+
+% } # foreach my $i