-% if ( $error ) {
-% $cgi->param('error', $error );
-<% $cgi->redirect($redirect) %>
-% } else {
-<% header(emt($message)) %>
- <SCRIPT TYPE="text/javascript">
- topreload();
- </SCRIPT>
- </BODY></HTML>
-% }
+<% $cgi->redirect(@redirect) %>
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
}
-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>