X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig.cgi;h=369314d98986d947acf29925a4178e1a97eccd06;hp=cf228dba51e641e5034ab11842a65343cd0c23ca;hb=3ce7691203a7737406bf2d4442f7fd84b81f847e;hpb=15e561850b61b10a92a46d8f3e316d53d4970087 diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index cf228dba5..369314d98 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -1,5 +1,5 @@ -<%= include("/elements/header.html",'Edit Configuration', menubar( 'Main Menu' => $p ) ) %> +<% include("/elements/header.html",'Edit Configuration', menubar( 'Main Menu' => $p ) ) %> +% my $conf = new FS::Conf; my @config_items = $conf->config_items; -<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
+% foreach my $section ( qw(required billing username password UI session +% shell BIND +% ), +% '', 'deprecated') { -<% foreach my $section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - + - <% foreach my $nav_section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - <% if ( $section eq $nav_section ) { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } else { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } %> - <% } %> +% foreach my $nav_section ( qw(required billing username password UI session +% shell BIND +% ), +% '', 'deprecated') { +% if ( $section eq $nav_section ) { + + [<% ucfirst($nav_section || 'unclassified') %>] +% } else { + + [<% ucfirst($nav_section || 'unclassified') %>] +% } +% } +
- <%= table("#cccccc", 2) %> + <% table("#cccccc", 2) %> - <%= ucfirst($section || 'unclassified') %> configuration options + <% ucfirst($section || 'unclassified') %> configuration options - <% foreach my $i (grep $_->section eq $section, @config_items) { %> +% foreach my $i (grep $_->section eq $section, @config_items) { + - <% my $n = 0; - foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - #warn $i->key unless defined($type); - %> - <% if ( $type eq '' ) { %> +% my $n = 0; +% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { +% #warn $i->key unless defined($type); +% +% if ( $type eq '' ) { + no type +% } elsif ( $type eq 'textarea' ) { - <% } elsif ( $type eq 'textarea' ) { %> - + +% } elsif ( $type eq 'checkbox' ) { - <% } elsif ( $type eq 'checkbox' ) { %> - exists($i->key) ? ' CHECKED' : '' %>> + exists($i->key) ? ' CHECKED' : '' %>> +% } elsif ( $type eq 'text' ) { - <% } elsif ( $type eq 'text' ) { %> - + +% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { - <% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { %> - > +% +% my %hash = (); +% if ( $i->select_enum ) { +% tie %hash, 'Tie::IxHash', +% '' => '', map { $_ => $_ } @{ $i->select_enum }; +% } elsif ( $i->select_hash ) { +% if ( ref($i->select_hash) eq 'ARRAY' ) { +% tie %hash, 'Tie::IxHash', +% '' => '', @{ $i->select_hash }; +% } else { +% tie %hash, 'Tie::IxHash', +% '' => '', %{ $i->select_hash }; +% } +% } else { +% %hash = ( '' => 'WARNING: neither select_enum nor select_hash specified in Conf.pm for configuration option "'. $i->key. '"' ); +% } +% +% my %saw = (); +% foreach my $value ( keys %hash ) { +% local($^W)=0; next if $saw{$value}++; +% my $label = $hash{$value}; +% + + + - <% foreach my $line ( $conf->config($i->key) ) { %> - - <% } %> +% foreach my $line ( $conf->config($i->key) ) { + + +% } +
- - + +
- <%= itable() %> - <% if ( defined $i->editlist_parts ) { %> - <% my $pnum=0; foreach my $part ( @{$i->editlist_parts} ) { %> + <% itable() %> +% if ( defined $i->editlist_parts ) { +% my $pnum=0; foreach my $part ( @{$i->editlist_parts} ) { + - <% if ( $part->{type} eq 'text' ) { %> - "> - <% } elsif ( $part->{type} eq 'immutable' ) { %> - <%= $part->{value} %>" value="<%= $part->{value} %>"> - <% } elsif ( $part->{type} eq 'select' ) { %> - "> +% } elsif ( $part->{type} eq 'immutable' ) { + + <% $part->{value} %>" value="<% $part->{value} %>"> +% } elsif ( $part->{type} eq 'select' ) { + + - <% } else { %> - unknown type <%= $part->type %> - <% } %> +% } else { + + unknown type <% $part->type %> +% } + - <% $pnum++; } %> - <% } else { %> - - <% } %> - - +% $pnum++; } +% } else { - <% } else { %> + +% } + + + +% } else { - unknown type <%= $type %> - <% } %> + unknown type <% $type %> +% } +% $n++; } - <% $n++; } %> - - <%= $i->key %> - <%= $i->description %> + + <% $i->key %> - <% $i->description %> - <% } %> +% } +
You may need to restart Apache and/or freeside-queued for configuration changes to take effect.


+% } -<% } %>