X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-view.cgi;h=4f6b5463ada3e63e4a6b84506255927f44f4a26c;hb=a3eeea576fbb0119c3c55306979e62352c6905ec;hp=5f2166320055cb8366025b5316be79d5dcacae0c;hpb=cc0c6be1aa795f85d05f15a3e8568fcef2bbd380;p=freeside.git diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index 5f2166320..4f6b5463a 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -1,16 +1,15 @@ <% include("/elements/header.html", $title, menubar( - 'Main Menu' => $p, 'View all agents' => $p.'browse/agent.cgi', ) ) %> - - - - +Click on a configuration value to change it. +

+ +<% include('/elements/init_overlib.html') %> % if ($FS::UID::use_confcompat) { @@ -38,20 +37,38 @@ % }
- <% table("#cccccc", 2) %> + % 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 = +% } - +
<% ucfirst($section || 'unclassified') %> configuration options
- <% $i->key %> - <% $i->description %> - <% include('/elements/popup_link.html', + 'action' => 'config.cgi?key='. $i->key. + ';agentnum='. $agentnum, + 'width' => $width, + 'height' => $height, + 'actionlabel' => 'Enter configuration value', + 'label' => ''. $i->key. '', + 'aname' => $i->key, + ) + %>: <% $i->description %> + -% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { +% foreach my $type (@types) { % my $n = 0; % if ( $type eq '' ) { @@ -72,9 +89,13 @@ % } elsif ( $type eq 'checkbox' ) { @@ -114,15 +135,16 @@ <%init> + die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); -my ($conf, $title, @config_items, $agentnum); - +my $agentnum = ''; if ($cgi->param('agentnum') =~ /^(\d+)$/) { $agentnum = $1; } +my $title; if ($agentnum) { my $agent = qsearchs('agent', { 'agentnum' => $agentnum } ); die "Agent $agentnum not found!" unless $agent; @@ -132,7 +154,10 @@ if ($agentnum) { $title = 'Global Configuration'; } -$conf = new FS::Conf; -@config_items = grep { $agentnum ? $_->per_agent : 1 } $conf->config_items; - +my $conf = new FS::Conf; + +my @config_items = grep { $agentnum ? $_->per_agent : 1 } + grep { $_->key != ~/^invoice_(html|latex|template)/ } + $conf->config_items; +
-
-<% encode_entities(join("\n", $conf->config($i->key, $agentnum) ) ) %>
-
+
+<% encode_entities(join("\n",
+     map { length($_) > 88 ? substr($_,0,88).'...' : $_ }
+         $conf->config($i->key, $agentnum)
+   ) )
+%>
+