X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-view.cgi;h=f5cead575f5e416c5d58af46d587f6df1b9fd6f5;hb=83e4d401f0cb6007ce91427434aa756a933691cc;hp=9a0006792cc99fd32b80c4a5f04e25e769c81dd3;hpb=a741f52db660b39a3f3c12acd0623d87bfc9108a;p=freeside.git
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 9a0006792..f5cead575 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -1,64 +1,159 @@
-
-<%= header('View Configuration', menubar( 'Main Menu' => $p,
- 'Edit Configuration' => 'config.cgi' ) ) %>
+<% include("/elements/header.html",
+ $title,
+ menubar(
+ 'View all agents' => $p.'browse/agent.cgi',
+ )
+ )
+%>
-<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
+Click on a configuration value to change it.
+
-<% foreach my $section ( qw(required billing username password UI session
- shell BIND
- ),
- '', 'deprecated') { %>
-
+
+
+
+
+
+% if ($FS::UID::use_confcompat) {
+
+ CONFIGURATION NOT STORED IN DATABASE -- USING COMPATIBILITY MODE
+%}
+%
+% 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) %>
+
- <%= 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 @types = ref($i->type) ? @{$i->type} : ($i->type);
+% my( $width, $height ) = ( 522, 336 );
+% if ( grep $_ eq 'textarea', @types ) {
+% #800x600
+% $width = 763;
+% $height = 408;
+% #1024x768
+% #$width =
+% #$height =
+% }
+
-
- <%= $i->key %> - <%= $i->description %>
- |
+
+%# <% $i->key %> - <% $i->description %>
+ <% $i->key %>: <% $i->description %>
+ |
- <% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
- my $n = 0; %>
- <% if ( $type eq '' ) { %>
- no type |
- <% } elsif ( $type eq 'textarea'
- || $type eq 'editlist'
- || $type eq 'selectmultiple' ) { %>
-
-
-<%= encode_entities(join("\n", $conf->config($i->key) ) ) %>
-
- |
- <% } elsif ( $type eq 'checkbox' ) { %>
- YES' : 'ff0000">NO' %> |
- <% } elsif ( $type eq 'text' || $type eq 'select' ) { %>
- <%= $conf->exists($i->key) ? $conf->config($i->key) : '' %> |
- <% } else { %>
+% foreach my $type (@types) {
+% my $n = 0;
+% if ( $type eq '' ) {
+
+
+ no type |
+
+% } elsif ( $type eq 'binary' ) {
+
+
+ <% $conf->exists($i->key, $agentnum)
+ ? qq!download!
+ : 'empty'
+ %>
+
+% } elsif ( $type eq 'textarea'
+% || $type eq 'editlist'
+% || $type eq 'selectmultiple' ) {
+
+
+
+
+<% encode_entities(join("\n",
+ map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
+ $conf->config($i->key, $agentnum)
+ ) )
+%>
+
+ |
+
+% } elsif ( $type eq 'checkbox' ) {
+
+
+ YES' : 'ff0000">NO' %> |
+
+% } elsif ( $type eq 'text' || $type eq 'select' ) {
+
+
+
+ <% $conf->exists($i->key, $agentnum) ? $conf->config($i->key, $agentnum) : '' %>
+ |
+% } elsif ( $type eq 'select-sub' ) {
+
+
+
+ <% $conf->config($i->key, $agentnum) %>:
+ <% &{ $i->option_sub }( $conf->config($i->key, $agentnum) ) %>
+ |
+
+% } else {
+
- unknown type <%= $type %>
+ unknown type <% $type %>
|
- <% } %>
- <% $n++; } %>
+% }
+% $n++; }
+
|
- <% } %>
+% }
+
-<% } %>
+% }
+