UX: add status to package actions, redirect back to package tab
[freeside.git] / httemplate / misc / process / cancel_pkg.html
index 6972a49..0649261 100755 (executable)
@@ -1,6 +1,10 @@
-<% header(emt("Package $past_method")) %>
+<& /elements/header-popup.html, emt("Package $past_method") &>
+  <script src="<% $fsurl %>elements/js.cookie.js"></script>
   <SCRIPT TYPE="text/javascript">
-    window.top.location.reload();
+    Cookies.set('freeside_status', <% mt("Package $past_method") |js_string %>,{
+                  expires: 0.0035
+    });
+    topreload();
   </SCRIPT>
   </BODY>
 </HTML>
@@ -85,6 +89,8 @@ my $bill =
 
 my $svc_fatal = ( $cgi->param('svc_not_fatal') ne 'Y' );
 
+my $only_svcnum = ($method eq 'uncancel') ? [ $cgi->param('only_svcnum') ] : undef;
+
 $error ||=  $cust_pkg->$method( 'reason'      => $reasonnum,
                                 'date'        => $date,
                                 'resume_date' => $resume_date,
@@ -92,6 +98,7 @@ $error ||=  $cust_pkg->$method( 'reason'      => $reasonnum,
                                 'bill'        => $bill,
                                 'svc_fatal'   => $svc_fatal,
                                 'options'     => $options,
+                                'only_svcnum' => $only_svcnum,
                               );
 
 if ($error) {