diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 15:02:24 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 15:02:24 -0800 |
commit | 081638aa4a483577a9c5bc7ac9ea518370cf2381 (patch) | |
tree | 510bd6cd7defd42043193a2bdf80df3d3dd224d9 /httemplate/edit/process | |
parent | 2756019bdb10fe144debfc8d6436468a89954eb3 (diff) |
UX: one-time charge - clarify quotation vs. real charge, acknowledge addition instead of silently redirecting
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index d1b8e1086..39628cae7 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,4 +1,4 @@ -<% $cgi->redirect($redirect) %> +<% $cgi->redirect(@redirect) %> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -148,14 +148,27 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge } -my $redirect; +my @redirect = (); if ( $error ) { $cgi->param('error', $error ); - $redirect = $p.'quick-charge.html?'. $cgi->query_string; + @redirect = ( $p.'quick-charge.html?'. $cgi->query_string ); } elsif ( $quotation ) { - $redirect = $fsurl.'view/quotation.html?' . $quotation->quotationnum; + @redirect = ( + -uri => $fsurl.'view/quotation.html?' . $quotation->quotationnum, + -cookie => CGI::Cookie->new( -name => 'freeside_status', + -value => mt('One-time charge added to quotation'), + -expires => '+5m', + ), + ); } else { - $redirect = $fsurl.'view/cust_main.cgi?custnum=' . $cust_main->custnum . ';show=last'; + @redirect = ( + -uri => $fsurl.'view/cust_main.cgi?custnum='. $cust_main->custnum. + ';show=last', + -cookie => CGI::Cookie->new( -name => 'freeside_status', + -value => mt('One-time charge ordered'), + -expires => '+5m', + ), + ); } </%init> |