projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
53cadf4
)
add ability to delete invoice_latexreturnaddress and invoice_htmlreturnaddress too...
author
ivan
<ivan>
Sun, 3 May 2009 01:45:09 +0000
(
01:45
+0000)
committer
ivan
<ivan>
Sun, 3 May 2009 01:45:09 +0000
(
01:45
+0000)
httemplate/config/config-view.cgi
patch
|
blob
|
history
diff --git
a/httemplate/config/config-view.cgi
b/httemplate/config/config-view.cgi
index
9b5b132
..
c5ac1a6
100644
(file)
--- a/
httemplate/config/config-view.cgi
+++ b/
httemplate/config/config-view.cgi
@@
-100,7
+100,8
@@
Click on a configuration value to change it.
% my $confnum =
% _config_agentonly($conf, $i->key, $agent->agentnum)->confnum;
(<A HREF="javascript:areyousure('delete this agent override', 'config-delete.cgi?confnum=<% $confnum %>;redirect=config_view_showagent')">delete agent override</A>)
% my $confnum =
% _config_agentonly($conf, $i->key, $agent->agentnum)->confnum;
(<A HREF="javascript:areyousure('delete this agent override', 'config-delete.cgi?confnum=<% $confnum %>;redirect=config_view_showagent')">delete agent override</A>)
-% } elsif ( $i->base_key ) {
+% } elsif ( $i->base_key
+% || ( $deleteable{$i->key} && $conf->exists($i->key) ) ) {
% my $confnum =
% $agent
% ? _config_agentonly($conf, $i->key, $agent->agentnum)->confnum
% my $confnum =
% $agent
% ? _config_agentonly($conf, $i->key, $agent->agentnum)->confnum
@@
-319,6
+320,9
@@
my $conf = new FS::Conf;
my @config_items = grep { $page_agent ? $_->per_agent : 1 }
$conf->config_items;
my @config_items = grep { $page_agent ? $_->per_agent : 1 }
$conf->config_items;
+my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress );
+my %deleteable = map { $_ => 1 } @deleteable;
+
my @sections = qw(required billing username password UI session shell BIND );
push @sections, '', 'deprecated';
my @sections = qw(required billing username password UI session shell BIND );
push @sections, '', 'deprecated';