summaryrefslogtreecommitdiff
path: root/httemplate/config/config.cgi
diff options
context:
space:
mode:
authorivan <ivan>2009-09-25 10:14:30 +0000
committerivan <ivan>2009-09-25 10:14:30 +0000
commit81e426fe755eaea508041bc2d7b25ac44c777434 (patch)
tree95a9a5fe952a77274f40e660400415e6b2db2997 /httemplate/config/config.cgi
parent25b0525eb1f0d018b893a7bdc96b92a8f446020f (diff)
nomadix, RT#5876
Diffstat (limited to 'httemplate/config/config.cgi')
-rw-r--r--httemplate/config/config.cgi21
1 files changed, 20 insertions, 1 deletions
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 <b><% $key %></b>
<td><input type="button" value="add" onClick="doadd<% "$key$n" %>(this.form)"></td>
</tr></table>
+% } 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 {
- <font color="#ff0000">unknown type <% $type %></font>
+ <font color="#ff0000">unknown type <% $type %></font>
% }
% $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
+);
+
</%once>
<%init>