[freeside-commits] branch FREESIDE_4_BRANCH updated. 5fc06d3c683c6d9a51508e2a50fa7e487af9294d
Ivan
ivan at 420.am
Fri Nov 11 12:48:16 PST 2016
The branch, FREESIDE_4_BRANCH has been updated
via 5fc06d3c683c6d9a51508e2a50fa7e487af9294d (commit)
from 287b33b072a38c08535bc0c300ea48e0a587190c (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 5fc06d3c683c6d9a51508e2a50fa7e487af9294d
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Nov 11 12:48:15 2016 -0800
UX: acknowledge actions instead of silently redirecting
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 2cb1648..354e22e 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -15,7 +15,14 @@
%
% } else {
%
-<% $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new->custnum) %>
+<% $cgi->redirect( -uri => popurl(3). "view/cust_main.cgi?". $new->custnum,
+ -cookie => CGI::Cookie->new(
+ -name => 'freeside_status',
+ -value => mt('Customer edited'),
+ -expires => '+5m',
+ ),
+ )
+%>
%
% }
<%once>
diff --git a/httemplate/misc/cust_main-cancel.cgi b/httemplate/misc/cust_main-cancel.cgi
index 73c4deb..4348873 100755
--- a/httemplate/misc/cust_main-cancel.cgi
+++ b/httemplate/misc/cust_main-cancel.cgi
@@ -1,5 +1,9 @@
<& /elements/header-popup.html, mt("Customer cancelled") &>
+ <script src="<% $fsurl %>elements/js.cookie.js"></script>
<SCRIPT TYPE="text/javascript">
+ Cookies.set('freeside_status', <% mt("Customer cancelled") |js_string %>,{
+ expires: 0.0035
+ });
topreload();
</SCRIPT>
</BODY>
diff --git a/httemplate/misc/cust_main-suspend.cgi b/httemplate/misc/cust_main-suspend.cgi
index e81e2b4..f20f20c 100755
--- a/httemplate/misc/cust_main-suspend.cgi
+++ b/httemplate/misc/cust_main-suspend.cgi
@@ -1,5 +1,9 @@
<& /elements/header-popup.html, mt("Customer suspended") &>
+ <script src="<% $fsurl %>elements/js.cookie.js"></script>
<SCRIPT TYPE="text/javascript">
+ Cookies.set('freeside_status', <% mt("Customer suspended") |js_string %>,{
+ expires: 0.0035
+ });
topreload();
</SCRIPT>
</BODY>
diff --git a/httemplate/misc/cust_main-unsuspend.cgi b/httemplate/misc/cust_main-unsuspend.cgi
index 99ec70a..7ccd707 100755
--- a/httemplate/misc/cust_main-unsuspend.cgi
+++ b/httemplate/misc/cust_main-unsuspend.cgi
@@ -1,5 +1,8 @@
<& /elements/header-popup.html, mt("Customer unsuspended") &>
<SCRIPT TYPE="text/javascript">
+ Cookies.set('freeside_status', <% mt("Customer unsuspended") |js_string %>,{
+ expires: 0.0035
+ });
topreload();
</SCRIPT>
</BODY>
diff --git a/httemplate/misc/unsusp_pkg.cgi b/httemplate/misc/unsusp_pkg.cgi
index ad7effc..e7157db 100755
--- a/httemplate/misc/unsusp_pkg.cgi
+++ b/httemplate/misc/unsusp_pkg.cgi
@@ -1,15 +1,13 @@
%if ( $error ) {
% errorpage($error);
%} else {
-% my $cookie = CGI::Cookie->new( -name => 'freeside_status',
-% -value => mt('Package unsuspended'),
-% -expires => '+5m',
-% );
-% #$r->headers_out->add( 'Set-Cookie' => $cookie->as_string );
<% $cgi->redirect(
- -uri => popurl(2). "view/cust_main.cgi?show=packages;custnum=".$cust_pkg->getfield('custnum'),
- -cookie => $cookie
- )
+ -uri => popurl(2). "view/cust_main.cgi?show=packages;custnum=$custnum",
+ -cookie => CGI::Cookie->new( -name => 'freeside_status',
+ -value => mt('Package unsuspended'),
+ -expires => '+5m',
+ ),
+ )
%>
%}
<%init>
@@ -26,4 +24,6 @@ my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
my $error = $cust_pkg->unsuspend;
+my $custnum = $cust_pkg->custnum;
+
</%init>
-----------------------------------------------------------------------
Summary of changes:
httemplate/edit/process/cust_main.cgi | 9 ++++++++-
httemplate/misc/cust_main-cancel.cgi | 4 ++++
httemplate/misc/cust_main-suspend.cgi | 4 ++++
httemplate/misc/cust_main-unsuspend.cgi | 3 +++
httemplate/misc/unsusp_pkg.cgi | 16 ++++++++--------
5 files changed, 27 insertions(+), 9 deletions(-)
More information about the freeside-commits
mailing list