projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
287b33b
)
UX: acknowledge actions instead of silently redirecting
author
Ivan Kohler
<ivan@freeside.biz>
Fri, 11 Nov 2016 20:48:15 +0000
(12:48 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Fri, 11 Nov 2016 20:48:15 +0000
(12:48 -0800)
httemplate/edit/process/cust_main.cgi
patch
|
blob
|
history
httemplate/misc/cust_main-cancel.cgi
patch
|
blob
|
history
httemplate/misc/cust_main-suspend.cgi
patch
|
blob
|
history
httemplate/misc/cust_main-unsuspend.cgi
patch
|
blob
|
history
httemplate/misc/unsusp_pkg.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/process/cust_main.cgi
b/httemplate/edit/process/cust_main.cgi
index
2cb1648
..
354e22e
100755
(executable)
--- a/
httemplate/edit/process/cust_main.cgi
+++ b/
httemplate/edit/process/cust_main.cgi
@@
-15,7
+15,14
@@
%
% } else {
%
%
% } 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>
%
% }
<%once>
diff --git
a/httemplate/misc/cust_main-cancel.cgi
b/httemplate/misc/cust_main-cancel.cgi
index
73c4deb
..
4348873
100755
(executable)
--- 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") &>
<& /elements/header-popup.html, mt("Customer cancelled") &>
+ <script src="<% $fsurl %>elements/js.cookie.js"></script>
<SCRIPT TYPE="text/javascript">
<SCRIPT TYPE="text/javascript">
+ Cookies.set('freeside_status', <% mt("Customer cancelled") |js_string %>,{
+ expires: 0.0035
+ });
topreload();
</SCRIPT>
</BODY>
topreload();
</SCRIPT>
</BODY>
diff --git
a/httemplate/misc/cust_main-suspend.cgi
b/httemplate/misc/cust_main-suspend.cgi
index
e81e2b4
..
f20f20c
100755
(executable)
--- 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") &>
<& /elements/header-popup.html, mt("Customer suspended") &>
+ <script src="<% $fsurl %>elements/js.cookie.js"></script>
<SCRIPT TYPE="text/javascript">
<SCRIPT TYPE="text/javascript">
+ Cookies.set('freeside_status', <% mt("Customer suspended") |js_string %>,{
+ expires: 0.0035
+ });
topreload();
</SCRIPT>
</BODY>
topreload();
</SCRIPT>
</BODY>
diff --git
a/httemplate/misc/cust_main-unsuspend.cgi
b/httemplate/misc/cust_main-unsuspend.cgi
index
99ec70a
..
7ccd707
100755
(executable)
--- 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">
<& /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>
topreload();
</SCRIPT>
</BODY>
diff --git
a/httemplate/misc/unsusp_pkg.cgi
b/httemplate/misc/unsusp_pkg.cgi
index
ad7effc
..
e7157db
100755
(executable)
--- a/
httemplate/misc/unsusp_pkg.cgi
+++ b/
httemplate/misc/unsusp_pkg.cgi
@@
-1,15
+1,13
@@
%if ( $error ) {
% errorpage($error);
%} else {
%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(
<% $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>
%>
%}
<%init>
@@
-26,4
+24,6
@@
my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
my $error = $cust_pkg->unsuspend;
my $error = $cust_pkg->unsuspend;
+my $custnum = $cust_pkg->custnum;
+
</%init>
</%init>