<% include('/elements/popup_link.html',
- 'action' => 'config.cgi?key='. $i->key.
- ';agentnum='. $agentnum,
+ 'action' => $action,
'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 %>
+% if ( $agent && $cgi->param('showagent') ) {
+% my $confnum = $conf->conf( $i->key, $agent->agentnum, 1 )->confnum;
+ (delete agent override)
+% } elsif ( $i->base_key
+% || ( $deleteable{$i->key} && $conf->exists($i->key) ) ) {
+% my $confnum =
+% $agent
+% ? $conf->conf( $i->key, $agent->agentnum, 1 )->confnum
+% : $conf->conf( $i->key )->confnum;
+% my $showagent = $cgi->param('showagent') ? '_showagent' : '';
+ (delete configuration item)
+% }
+
|
@@ -67,12 +161,12 @@ Click on a configuration value to change it.
% } elsif ( $type eq 'image' ) {
+% my $args = 'key=' . $i->key . ";agentnum=$agentnum;locale=$locale";
<% $conf->exists($i->key, $agentnum)
- ? ''
+ ? ''
: 'empty'
%>
|
@@ -80,18 +174,19 @@ Click on a configuration value to change it.
<% $conf->exists($i->key, $agentnum)
- ? qq!download!
+ ? 'download'
: ''
%>
|
% } elsif ( $type eq 'binary' ) {
+% my $args = 'key=' . $i->key . ";agentnum=$agentnum;locale=$locale";
<% $conf->exists($i->key, $agentnum)
- ? qq!download!
+ ? 'download'
: 'empty'
%>
|
@@ -99,24 +194,24 @@ Click on a configuration value to change it.
% } elsif ( $type eq 'textarea'
% || $type eq 'editlist'
-% || $type eq 'selectmultiple' ) {
+% || $type eq 'selectmultiple'
+% )
+% {
-
-
-<% encode_entities(join("\n",
+
+<% encode_entities(join("\n",
map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
$conf->config($i->key, $agentnum)
) )
-%>
-
+%>
|
|
% } elsif ( $type eq 'checkbox' ) {
- YES' : 'ff0000">NO' %> |
+ YES' : 'ff0000">NO' %> |
% } elsif ( $type eq 'select' && $i->select_hash ) {
@@ -129,7 +224,7 @@ Click on a configuration value to change it.
% }
-
+ |
<% $conf->exists($i->key, $agentnum) ? $hash{ $conf->config($i->key, $agentnum) } : '' %>
|
@@ -137,65 +232,195 @@ Click on a configuration value to change it.
% } 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' ) {
-
+ |
+% if ( $i->multiple ) {
+ <% join(' ',
+ map { $_ . ": " . &{ $i->option_sub }($_) }
+ $conf->config($i->key,$agentnum)
+ )
+ %>
+% } else {
<% $conf->config($i->key, $agentnum) %>:
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
+% }
+ |
+
+
+% } elsif ( $type =~ /^select-(part_svc|part_pkg|pkg_class|agent)$/ ) {
+%
+% my $table = $1;
+% my $namecol = $namecol{$table};
+% my $pkey = dbdef->table($table)->primary_key;
+%
+% my @keys = $conf->config($i->key, $agentnum);
+
+
+
+ <% join( ' ',
+ map {
+ my $key = $_;
+ my $record = qsearchs($table, { $pkey => $key });
+ $record ? "$key: ".$record->$namecol() : $key;
+ } @keys
+ )
+ %>
|
-% } else {
+% } else {
unknown type <% $type %>
|
-% }
+% }
% $n++;
% }
|
-% }
+
+% } # foreach my $agentnum
+
+% if ( @add_agents ) {
+
+
+
+
+ |
+
+
+% } #if @add_agents
+
+% } # foreach my $i