summaryrefslogtreecommitdiff
path: root/httemplate/edit/bulk-cust_main_county.html
diff options
context:
space:
mode:
authorivan <ivan>2009-10-30 00:02:51 +0000
committerivan <ivan>2009-10-30 00:02:51 +0000
commit65f3079c363672d728147b30348925d495748cd6 (patch)
tree744d2469a7aae7c8ccc8faae857f10ae7bde2146 /httemplate/edit/bulk-cust_main_county.html
parent7be6febddf3f7f6f28e4637a95b56e3f39bd220f (diff)
bulk tax changes, RT#6445
Diffstat (limited to 'httemplate/edit/bulk-cust_main_county.html')
-rw-r--r--httemplate/edit/bulk-cust_main_county.html22
1 files changed, 10 insertions, 12 deletions
diff --git a/httemplate/edit/bulk-cust_main_county.html b/httemplate/edit/bulk-cust_main_county.html
index 93d9444b8..8e447e54f 100644
--- a/httemplate/edit/bulk-cust_main_county.html
+++ b/httemplate/edit/bulk-cust_main_county.html
@@ -1,7 +1,8 @@
-<% include('/elements/header-popup.html', 'Bulk Tax rate') %>
+<% include('/elements/header-popup.html', $title ) %>
<FORM ACTION="<% popurl(1)."process/bulk-cust_main_county.html" %>" METHOD="POST">
+<INPUT TYPE="hidden" NAME="action" VALUE="<% $action %>">
<INPUT TYPE="hidden" NAME="taxnum" VALUE="<% join(',', @taxnum) %>">
<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
@@ -68,7 +69,7 @@
<BR>
-<INPUT TYPE="submit" VALUE="Bulk add tax">
+<INPUT TYPE="submit" VALUE="Bulk <% $action %> tax">
<%init>
@@ -78,16 +79,13 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my @taxnum;
-if ( $cgi->param('error') ) {
- $cgi->param('taxnum') =~ /^([\d,]+)$/
- or die "no taxnum, but error: ". $cgi->param('error');
- @taxnum = split(',', $1);
-} else {
- my($query) = $cgi->keywords;
- $query =~ /^([\d,]+)$/
- or $m->comp('/elements/errorpage-popup.html', 'Nothing selected');
- @taxnum = split(',', $1);
-}
+$cgi->param('taxnum') =~ /^([\d,]+)$/
+ or $m->comp('/elements/errorpage-popup.html', $cgi->param('error') || 'Nothing selected');
+my @taxnum = split(',', $1);
+
+$cgi->param('action') =~ /^(add|edit)$/ or die "unknown action";
+my $action = $1;
+my $title = "Bulk $action tax rate";
my @cust_main_county =
map {