UX: acknowledge actions instead of silently redirecting
[freeside.git] / httemplate / misc / process / cancel_pkg.html
index 6972a49..7e33e15 100755 (executable)
@@ -1,9 +1,4 @@
-<% header(emt("Package $past_method")) %>
-  <SCRIPT TYPE="text/javascript">
-    window.top.location.reload();
-  </SCRIPT>
-  </BODY>
-</HTML>
+<& /elements/popup-topreload.html, et("Package $past_method") &>
 <%once>
 
 my %past = ( 'cancel'   => 'cancelled',
@@ -85,6 +80,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 +89,7 @@ $error ||=  $cust_pkg->$method( 'reason'      => $reasonnum,
                                 'bill'        => $bill,
                                 'svc_fatal'   => $svc_fatal,
                                 'options'     => $options,
+                                'only_svcnum' => $only_svcnum,
                               );
 
 if ($error) {