diff options
author | ivan <ivan> | 2003-04-01 06:55:35 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-04-01 06:55:35 +0000 |
commit | 33849ebe914f0cb3d80c11b039abc52a1dcf94be (patch) | |
tree | c60ebff7845d688e2668675a0d5e662c6715b4e1 | |
parent | 401acedbab35a198218e3e09f5445e1e5163ee9c (diff) |
cancel button for customers (closes: Bug#25)
-rwxr-xr-x | httemplate/view/cust_main.cgi | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 9b7b5d029..1d6243e23 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -22,10 +22,23 @@ my $custnum = $1; my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); die "Customer not found!" unless $cust_main; -print qq!<A HREF="!, popurl(2), - qq!edit/cust_main.cgi?$custnum">Edit this customer</A>!; -print qq! | <A HREF="!, popurl(2), - qq!misc/delete-customer.cgi?$custnum"> Delete this customer</A>! +print qq!<A HREF="${p}edit/cust_main.cgi?$custnum">Edit this customer</A>!; + +print <<END; +<SCRIPT> +function cancel_areyousure(href) { + if (confirm("Perminantly delete all services and cancel this customer?") == true) + window.location.href = href; +} +</SCRIPT> +END + +print qq! | <A HREF="javascript:cancel_areyousure('${p}misc/cust_main-cancel.cgi?$custnum')">!. + 'Cancel this customer</A>' + if $cust_main->ncancelled_pkgs; + +print qq! | <A HREF="${p}misc/delete-customer.cgi?$custnum">!. + 'Delete this customer</A>' if $conf->exists('deletecustomers'); unless ( $conf->exists('disable_customer_referrals') ) { |