[freeside-commits] freeside/httemplate/config config-view.cgi, 1.29, 1.30 config-delete.cgi, 1.2, 1.3

Ivan,,, ivan at wavetail.420.am
Sat May 2 18:11:52 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/config
In directory wavetail.420.am:/tmp/cvs-serv29587/httemplate/config

Modified Files:
	config-view.cgi config-delete.cgi 
Log Message:
add ability to remove suffix-ed config items, RT#5218

Index: config-delete.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-delete.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- config-delete.cgi	2 May 2009 00:01:30 -0000	1.2
+++ config-delete.cgi	3 May 2009 01:11:50 -0000	1.3
@@ -10,8 +10,10 @@
 $conf->delete;
 
 my $redirect = popurl(2);
-if ( $cgi->param('redirect') eq 'config_view' ) {
+if ( $cgi->param('redirect') eq 'config_view_showagent' ) {
   $redirect .= 'config/config-view.cgi?showagent=1#'. $conf->name;
+} elsif ( $cgi->param('redirect') eq 'config_view' ) {
+  $redirect .= 'config/config-view.cgi';
 } else {
   $redirect .= 'browse/agent.cgi';
 }

Index: config-view.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/config/config-view.cgi,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- config-view.cgi	2 May 2009 00:01:30 -0000	1.29
+++ config-view.cgi	3 May 2009 01:11:50 -0000	1.30
@@ -97,7 +97,16 @@
                     )
           %>: <% $i->description %>
 %       if ( $agent && $cgi->param('showagent') ) {
-          (<A HREF="javascript:areyousure('delete this agent override', 'config-delete.cgi?confnum=<% _config_agentonly($conf, $i->key, $agent->agentnum)->confnum %>;redirect=config_view')">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 ) {
+%         my $confnum =
+%           $agent
+%             ? _config_agentonly($conf, $i->key, $agent->agentnum)->confnum
+%             : $conf->_config( $i->key )->confnum;
+%         my $showagent = $cgi->param('showagent') ? '_showagent' : '';
+          (<A HREF="javascript:areyousure('delete this configuration item', 'config-delete.cgi?confnum=<% $confnum %>;redirect=config_view<%$showagent%>')">delete configuration item</A>)
 %       }
 
       </td>
@@ -308,7 +317,6 @@
 my $conf = new FS::Conf;
  
 my @config_items = grep { $page_agent ? $_->per_agent : 1 }
-                   grep { $_->key != ~/^invoice_(html|latex|template)/ }
                         $conf->config_items; 
 
 my @sections = qw(required billing username password UI session shell BIND );



More information about the freeside-commits mailing list