summaryrefslogtreecommitdiff
path: root/httemplate/config
diff options
context:
space:
mode:
authorivan <ivan>2010-06-30 20:42:54 +0000
committerivan <ivan>2010-06-30 20:42:54 +0000
commitfd93bd0bf90836be82c5271bb36e46cca83735f4 (patch)
tree411aeac519f354cb98e675f375df88ff26ca3a04 /httemplate/config
parentb495de6efd8206f6e4ee1ce18a6a0b027484d5d0 (diff)
cust_main exports! cust_main-exports config option and part_export/cust_http.pm export, RT#8952
Diffstat (limited to 'httemplate/config')
-rw-r--r--httemplate/config/config-process.cgi2
-rw-r--r--httemplate/config/config.cgi18
2 files changed, 17 insertions, 3 deletions
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index c2b11b8fc..4e1c85a03 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -73,7 +73,7 @@
% my $record = qsearchs($table, { $pkey => $key });
% my $value = $record ? "$key: ".$record->$namecol() : $key;
configCell.innerHTML = <% $value |js_string %>;
-% } elsif ( $type eq 'select-sub' ) {
+% } elsif ( $type eq 'select-sub' && ! $i->multiple ) {
configCell.innerHTML =
<% $conf->config($i->key, $agentnum) |js_string %> + ': ' +
<% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) |js_string %>;
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi
index ce96bc162..cde48382a 100644
--- a/httemplate/config/config.cgi
+++ b/httemplate/config/config.cgi
@@ -131,7 +131,11 @@ Setting <b><% $key %></b>
% } elsif ( $type eq 'select-sub' ) {
- <select name="<% "$key$n" %>"><option value="">
+ <select name="<% "$key$n" %>" <% $config_item->multiple ? 'MULTIPLE' : '' %>>
+
+% unless ( $config_item->multiple ) {
+ <option value="">
+% }
% my %options = &{$config_item->options_sub};
% my @options = sort { $a <=> $b } keys %options;
@@ -139,7 +143,17 @@ Setting <b><% $key %></b>
% foreach my $value ( @options ) {
% local($^W)=0; next if $saw{$value}++;
- <option value="<% $value %>" <% $value eq $conf->config($key, $agentnum) ? 'SELECTED' : '' %>><% $value %>: <% $options{$value} %>
+ <option value="<% $value %>"
+
+% if ( $value eq $conf->config($key, $agentnum)
+% || ( $config_item->multiple
+% && grep { $_ eq $value } $conf->config($key, $agentnum) ) ){
+
+ SELECTED
+
+% }
+
+ ><% $value %>: <% $options{$value} %>
% }
% my $curvalue = $conf->config($key, $agentnum);