diff options
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/cancel_cust.html | 24 | ||||
-rw-r--r-- | httemplate/misc/order_pkg.html | 10 |
2 files changed, 16 insertions, 18 deletions
diff --git a/httemplate/misc/cancel_cust.html b/httemplate/misc/cancel_cust.html index bb4e1904a..74362f862 100644 --- a/httemplate/misc/cancel_cust.html +++ b/httemplate/misc/cancel_cust.html @@ -17,8 +17,7 @@ <% include('/elements/tr-select-reason.html', 'field' => 'reasonnum', 'reason_class' => 'C', - #XXX these need to be sticky on errors too... - #'curr_value' => '', + 'cgi' => $cgi, 'control_button' => 'document.cust_cancel_popup.submit', ) %> @@ -35,24 +34,21 @@ <%init> -my($custnum, $reasonnum, $submit, $cust_main, $curuser, $class); +my $reasonnum = ''; +my($submit, $class); + +$cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; +my $custnum = $1; + 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; - } + $reasonnum = $cgi->param('reasonnum'); } -$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, diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index 05cd99cc5..f4f297140 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -10,6 +10,8 @@ function enable_order_pkg () { } </SCRIPT> +<% include('/elements/error.html') %> + <FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/quick-cust_pkg.cgi" METHOD="POST"> <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>"> @@ -19,8 +21,9 @@ function enable_order_pkg () { <TH ALIGN="right">Package</TH> <TD> <% include('/elements/select-cust-part_pkg.html', - 'cust_main' => $cust_main, - 'onchange' => 'enable_order_pkg', + 'curr_value' => scalar( $cgi->param('pkgpart') ), + 'cust_main' => $cust_main, + 'onchange' => 'enable_order_pkg', ) %> </TD> @@ -50,8 +53,7 @@ die "access denied" my $conf = new FS::Conf; -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; +$cgi->param('custnum') =~ /^(\d+)$/; my $custnum = $1; my $cust_main = qsearchs({ 'table' => 'cust_main', |