From 6a1d3fe46f65b0a24ec025c22afcdb75af3c9e9a Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 17 Apr 2009 08:02:29 +0000 Subject: show labels for select(select_hash) config options, RT#3997 --- httemplate/config/config-process.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'httemplate/config/config-process.cgi') diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index 84bfdefcb..894dc41b2 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -87,6 +87,15 @@ $conf->delete($_, $agentnum) foreach @delete; 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' ) { -- cgit v1.2.1 From 8cda5aa78a9ae58afe4b9f3684165658eb73c163 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 1 May 2009 01:07:45 +0000 Subject: add ability to edit the agent overrides from the main config, RT#4218 --- httemplate/config/config-process.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/config/config-process.cgi') diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi index 894dc41b2..a5918c035 100644 --- a/httemplate/config/config-process.cgi +++ b/httemplate/config/config-process.cgi @@ -65,7 +65,7 @@ $conf->delete($_, $agentnum) foreach @delete;