X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig.cgi;fp=httemplate%2Fconfig%2Fconfig.cgi;h=4ebedc180ebcab485d68b993ce7c16df6c47c6a8;hb=81e426fe755eaea508041bc2d7b25ac44c777434;hp=8d5b1ae430744407b56f0ba35c0c585fd2a92e87;hpb=25b0525eb1f0d018b893a7bdc96b92a8f446020f;p=freeside.git diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index 8d5b1ae43..4ebedc180 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -267,9 +267,24 @@ Setting <% $key %> (this.form)"> +% } elsif ( $element_types{$type} ) { +% +% my %opt = ( 'element_name' => "$key$n", +% 'empty_label' => ' ', +% ); +% 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++; @@ -292,6 +307,10 @@ my $conf = new FS::Conf; my @config_items = $conf->config_items; my %confitems = map { $_->key => $_ } @config_items; +my %element_types = map { $_ => 1 } qw( + select-part_svc +); + <%init>