[freeside-commits] branch master updated. 081638aa4a483577a9c5bc7ac9ea518370cf2381
Ivan
ivan at 420.am
Fri Nov 11 15:02:25 PST 2016
The branch, master has been updated
via 081638aa4a483577a9c5bc7ac9ea518370cf2381 (commit)
from 2756019bdb10fe144debfc8d6436468a89954eb3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 081638aa4a483577a9c5bc7ac9ea518370cf2381
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Nov 11 15:02:24 2016 -0800
UX: one-time charge - clarify quotation vs. real charge, acknowledge addition instead of silently redirecting
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi
index d1b8e10..39628ca 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>
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 896e8b2..af6fd41 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -1,12 +1,15 @@
-% if ( $quotationnum ) {
-<& /elements/header.html, mt('One-time charge') &>
+% if ( $quotationnum && ! $cust_main ) {
+<& /elements/header.html, mt('Quotation #[_1]: add one-time charge', $quotationnum) &>
% } else {
<& /elements/header-cust_main.html,
- view => 'packages',
+ view => $quotationnum ? 'quotations' : 'packages',
cust_main => $cust_main,
etc => $cgi->param('error') ? '' : 'onload="addRow()"',
&>
-<h2>One-time charge</h2>
+<h2><% $quotationnum
+ ? emt('Quotation #[_1]: add one-time charge', $quotationnum)
+ : mt('One-time charge')
+ %></h2>
% }
<& /elements/init_calendar.html &>
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/process/quick-charge.cgi | 23 ++++++++++++++++++-----
httemplate/edit/quick-charge.html | 11 +++++++----
2 files changed, 25 insertions(+), 9 deletions(-)
More information about the freeside-commits
mailing list