From 7b657e6cca6770039c52ca6bc43cd9a7b24072c8 Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 19 Dec 2007 22:31:38 +0000 Subject: backport reason selection for whole customer cancel (RT#2872) --- httemplate/view/cust_main.cgi | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_main.cgi') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 850b48b27..382bf68f6 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -37,9 +37,9 @@ var confirm_cancel = '
Cancel this customer | + <% cust_cancel_link($cust_main) %> | + % } % if ( $conf->exists('deletecustomers') % && $curuser->access_right('Delete customer') @@ -169,3 +169,33 @@ my $cust_main = qsearchs({ die "Customer not found!" unless $cust_main; +<%once> + + +sub cust_cancel_link { cust_popup_link( 'misc/cancel_cust.html', + 'Cancel this customer', + 'Confirm Cancellation', + '#ff0000', + @_, + ); +} + +#false laziness w/view/cust_main/packages.html + +sub cust_popup_link { + my($action, $label, $actionlabel, $color, $cust_main) = @_; + $action .= '?'. $cust_main->custnum; + popup_link($action, $label, $actionlabel, $color); +} + +sub popup_link { + my($action, $label, $actionlabel, $color) = @_; + $color ||= '#333399'; + qq!$label!; + +# CLOSETEXT, '', +#WIDTH, 576, HEIGHT, 128, TEXTSIZE, 3, +#BGCOLOR, '#ff0000', CGCOLOR, '#ff0000' +} + + -- cgit v1.2.1