2 <%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %>
4 <% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
6 <form action="config-process.cgi" METHOD="POST">
8 <% foreach my $section ( qw(required billing username password UI session
9 shell mail radius apache BIND
11 '', 'deprecated') { %>
12 <%= table("#cccccc", 2) %>
14 <th colspan="2" bgcolor="#dcdcdc">
15 <%= ucfirst($section || 'unclassified') %> configuration options
18 <% foreach my $i (grep $_->section eq $section, @config_items) { %>
22 foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
23 #warn $i->key unless defined($type);
25 <% if ( $type eq '' ) { %>
26 <font color="#ff0000">no type</font>
27 <% } elsif ( $type eq 'textarea' ) { %>
28 <textarea name="<%= $i->key. $n %>" rows=5><%= join("\n", $conf->config($i->key) ) %></textarea>
29 <% } elsif ( $type eq 'checkbox' ) { %>
30 <input name="<%= $i->key. $n %>" type="checkbox" value="1"<%= $conf->exists($i->key) ? ' CHECKED' : '' %>>
31 <% } elsif ( $type eq 'text' ) { %>
32 <input name="<%= $i->key. $n %>" type="<%= $type %>" value="<%= $conf->exists($i->key) ? $conf->config($i->key) : '' %>">
33 <% } elsif ( $type eq 'select' ) { %>
34 <select name="<%= $i->key. $n %>">
36 foreach my $value ( "", @{$i->select_enum} ) {
37 local($^W)=0; next if $saw{$value}++; %>
38 <option value="<%= $value %>"<%= $value eq $conf->config($i->key) ? ' SELECTED' : '' %>><%= $value %>
40 <% if ( $conf->exists($i->key) && $conf->config($i->key) && ! grep { $conf->config($i->key) eq $_ } @{$i->select_enum}) { %>
41 <option value=<%= $conf->config($i->key) %> SELECTED><%= conf->config($i->key) %>
44 <font color="#ff0000">unknown type <%= $type %></font>
48 <td><a name="<%= $i->key %>">
49 <b><%= $i->key %></b> - <%= $i->description %>
56 You may need to restart Apache and/or freeside-queued for configuration
57 changes to take effect.<BR>
59 <input type="submit" value="Apply changes">