X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fcancel_cust.html;h=12c37ebe2df9ad52b683e9b3344ba7e80edbfef5;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hp=bb4e1904a0e95776084237578374eb41b262f5ef;hpb=f49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1;p=freeside.git diff --git a/httemplate/misc/cancel_cust.html b/httemplate/misc/cancel_cust.html index bb4e1904a..12c37ebe2 100644 --- a/httemplate/misc/cancel_cust.html +++ b/httemplate/misc/cancel_cust.html @@ -17,9 +17,8 @@ <% include('/elements/tr-select-reason.html', 'field' => 'reasonnum', 'reason_class' => 'C', - #XXX these need to be sticky on errors too... - #'curr_value' => '', - 'control_button' => 'document.cust_cancel_popup.submit', + 'cgi' => $cgi, + 'control_button' => "document.getElementById('confirm_cancel_cust_button')", ) %> @@ -27,7 +26,7 @@

-          +          @@ -35,24 +34,14 @@ <%init> -my($custnum, $reasonnum, $submit, $cust_main, $curuser, $class); -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - $reasonnum = $cgi->param('reasonnum'); -} else { - my( $query ) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { - $custnum = $1; - } else { - die "illegal query ". $cgi->keywords; - } -} +$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; +my $custnum = $1; -$curuser = $FS::CurrentUser::CurrentUser; +my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('Cancel customer'); -$cust_main = qsearchs( { +my $cust_main = qsearchs( { 'table' => 'cust_main', 'hashref' => { 'custnum' => $custnum }, 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,