need a POST here; browsers (especially IE) are unhappy with the default GET
[freeside.git] / httemplate / config / config.cgi
1 <%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %>
2
3 <% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
4
5 <form action="config-process.cgi" METHOD="POST">
6
7 <% foreach my $section ( qw(required billing username password UI session
8                             shell mail radius apache BIND
9                            ),
10                          '', 'depreciated') { %>
11   <%= table("#cccccc", 2) %>
12   <tr>
13     <th colspan="2" bgcolor="#dcdcdc">
14       <%= ucfirst($section || 'unclassified') %> configuration options
15     </th>
16   </tr>
17   <% foreach my $i (grep $_->section eq $section, @config_items) { %>
18     <tr>
19       <td>
20         <% my $n = 0;
21            foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
22              #warn $i->key unless defined($type);
23         %>
24           <% if ( $type eq '' ) { %>
25             <font color="#ff0000">no type</font>
26           <% } elsif ( $type eq 'textarea' ) { %>
27             <textarea name="<%= $i->key. $n %>" rows=5><%= join("\n", $conf->config($i->key) ) %></textarea>
28           <% } elsif ( $type eq 'checkbox' ) { %>
29             <input name="<%= $i->key. $n %>" type="checkbox" value="1"<%= $conf->exists($i->key) ? ' CHECKED' : '' %>>
30           <% } elsif ( $type eq 'text' )  { %>
31             <input name="<%= $i->key. $n %>" type="<%= $type %>" value="<%= $conf->exists($i->key) ? $conf->config($i->key) : '' %>">
32           <% } else { %>
33             <font color="#ff0000">unknown type <%= $type %></font>
34           <% } %>
35         <% $n++; } %>
36       </td>
37       <td><a name="<%= $i->key %>">
38         <b><%= $i->key %></b> - <%= $i->description %>
39       </a></td>
40     </tr>
41   <% } %>
42   </table><br><br>
43 <% } %>
44
45 You may need to restart Apache and/or freeside-queued for configuration
46 changes to take effect.<BR>
47
48 <input type="submit" value="Apply changes">
49 </form>
50
51 </body></html>