X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig.cgi;h=ce96bc162d3b62c42aa88094fd62c45380acdb75;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=f390c64a3951ad7bac2a5a2ea76381191af8db34;hpb=a4b8ce8cd1d309de00c64f38049a8dda38798046;p=freeside.git diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index f390c64a3..ce96bc162 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -84,11 +84,9 @@ Setting <% $key %> % '' => '', 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. '"' ); @@ -269,9 +267,25 @@ Setting <% $key %> (this.form)"> +% } elsif ( $element_types{$type} ) { +% +% my %opt = ( 'element_name' => "$key$n", +% 'empty_label' => ' ', +% 'showdisabled' => 1, +% ); +% if ( $config_item->multiple ) { +% $opt{'multiple'} = 1 if $config_item->multiple; +% $opt{'curr_value'} = [ $conf->config($key, $agentnum) ]; +% } else { +% $opt{'curr_value'} = +% $conf->exists($key, $agentnum) ? $conf->config($key, $agentnum) : ''; +% } + + <% include("/elements/$type.html", %opt ) %> + % } else { - unknown type <% $type %> + unknown type <% $type %> % } % $n++; @@ -291,10 +305,13 @@ Setting <% $key %> <%once> my $conf = new FS::Conf; -my @config_items = grep { $_->key != ~/^invoice_(html|latex|template)/ } - $conf->config_items; +my @config_items = $conf->config_items; my %confitems = map { $_->key => $_ } @config_items; +my %element_types = map { $_ => 1 } qw( + select-part_svc select-part_pkg select-pkg_class +); + <%init>