add back remove ("collapse") links again. on each line this time. RT#2973
[freeside.git] / httemplate / edit / process / cust_main_county-collapse.cgi
index 4888b78..18bd1fd 100755 (executable)
@@ -1,11 +1,14 @@
-<!-- $Id: cust_main_county-collapse.cgi,v 1.2 2002-01-30 14:18:09 ivan Exp $ -->
-<%
+<% $cgi->redirect(popurl(3). "browse/cust_main_county.cgi") %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
 my($query) = $cgi->keywords;
 $query =~ /^(\d+)$/ or die "Illegal taxnum!";
 my $taxnum = $1;
-my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum})
-  or die ("Unknown taxnum!");
+my $cust_main_county = qsearchs('cust_main_county', { 'taxnum' => $taxnum } )
+  or die "Unknown taxnum $taxnum";
 
 #really should do this in a .pm & start transaction
 
@@ -31,6 +34,4 @@ $cust_main_county->county('');
 my $error = $cust_main_county->insert;
 die $error if $error;
 
-print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi");
-
-%>
+</%init>