X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-view.cgi;fp=httemplate%2Fconfig%2Fconfig-view.cgi;h=13286cf212d9f5f850752f1ac2a20e95684d84d2;hb=89e3b22429fb7c216a6f4755002bf50677dd9e97;hp=856a2eaef76ad2125713d7ad677e55642a727ff3;hpb=56d8a66d0ad959056e04578e237c14d1f5242a44;p=freeside.git diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index 856a2eaef..13286cf21 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -210,13 +210,21 @@ Click on a configuration value to change it. % } elsif ( $type =~ /^select-(part_svc|part_pkg|pkg_class)$/ ) { +% +% my $table = $1; +% my $namecol = $namecol{$table}; +% my $pkey = dbdef->table($table)->primary_key; +% % my @keys = $conf->config($i->key, $agentnum); - <% join('
', map { $_ # ': '. $svc, $pkg, whatever - } - @keys + <% join( '
', + map { + my $key = $_; + my $record = qsearchs($table, { $pkey => $key }); + $record ? "$key: ".$record->$namecol() : $key; + } @keys ) %> @@ -301,6 +309,14 @@ Click on a configuration value to change it. +<%once> +#false laziness w/config-process.cgi +my %namecol = ( + 'part_svc' => 'svc', + 'part_pkg' => 'pkg', + 'pkg_class' => 'classname', +); + <%init> die "access denied" @@ -343,6 +359,5 @@ my @all_agents = (); if ( $cgi->param('showagent') ) { @all_agents = qsearch('agent', { 'disabled' => '' } ); } -warn 'all agents: '. join('-', @all_agents);