summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/quick-cust_pkg.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/quick-cust_pkg.cgi')
-rw-r--r--httemplate/edit/process/quick-cust_pkg.cgi26
1 files changed, 13 insertions, 13 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi
index 7afc9f2bb..66d02e307 100644
--- a/httemplate/edit/process/quick-cust_pkg.cgi
+++ b/httemplate/edit/process/quick-cust_pkg.cgi
@@ -1,5 +1,3 @@
-%
-%
%#untaint custnum
%$cgi->param('custnum') =~ /^(\d+)$/
% or die 'illegal custnum '. $cgi->param('custnum');
@@ -9,19 +7,21 @@
%my $pkgpart = $1;
%
%my @cust_pkg = ();
-%my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, );
+%my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, [ $cgi->param('refnum') ] );
%
%if ($error) {
-%
-
-<!-- mason kludge -->
-%
-% eidiot($error);
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(2). 'misc/order_pkg.html?'. $cgi->query_string );
%} else {
-% print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum".
-% "#cust_pkg". $cust_pkg[0]->pkgnum );
-%}
-%
-%
+% my $frag = "cust_pkg". $cust_pkg[0]->pkgnum;
+<% header('Package ordered') %>
+ <SCRIPT TYPE="text/javascript">
+ // XXX fancy ajax rebuild table at some point, but a page reload will do for now
+ // XXX chop off trailing #target and replace... ?
+ window.top.location = '<% popurl(3). "view/cust_main.cgi?keywords=$custnum;fragment=$frag#$frag" %>';
+ </SCRIPT>
+
+ </BODY></HTML>
+%}