From ed1197f2bb50ba263cad1e27877f074f95e15a84 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 11 Jun 2012 13:56:58 +0200 Subject: [PATCH 2/2] Bug 5349 follow-up: run transferorder.pl in a popup --- acqui/transferorder.pl | 5 +--- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 10 ++++++-- .../prog/en/modules/acqui/transferorder.tt | 26 +++++++++----------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 27c4509..6a0c63e 100755 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -77,9 +77,7 @@ if( $basketno && $ordernumber) { TransferOrder($ordernumber, $basketno); - my $referrer = $input->param('referrer'); - print $input->redirect($referrer); - exit; + $template->param(transferred => 1) } elsif ( $bookselleridto && $ordernumber) { # Show open baskets for this bookseller my $order = GetOrder( $ordernumber ); @@ -138,7 +136,6 @@ $template->param( booksellertoname => $booksellertoname, ordernumber => $ordernumber, basketno => $basketno, - referrer => $input->param('referrer') ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 19af115..264e562 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -109,7 +109,7 @@ + '' + 'Receive' + '
' - + 'Transfer' + + 'Transfer' + '').appendTo("table#pendingt"); } @@ -151,6 +151,12 @@ } } + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> @@ -262,7 +268,7 @@ Receive
- Transfer + Transfer diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt index f694c1f..c44b583 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -1,16 +1,16 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Transfer order [% INCLUDE 'doc-head-close.inc' %] +[% IF transferred %] + +[% END %] -[% INCLUDE 'header.inc' %] -[% INCLUDE 'acquisitions-search.inc' %] - -
@@ -32,7 +32,7 @@ [% basket.basketname %] (#[% basket.basketno %]) [% basket.createdby %] [% basket.creationdate %] - Choose + Choose [% END %] @@ -59,7 +59,7 @@ [% IF ( ordersloo.isbn ) %] – [% ordersloo.isbn %][% END %] [% IF ( ordersloo.publishercode ) %]
Publisher :[% ordersloo.publishercode %][% END %] - Transfer + Transfer [% END %] @@ -81,7 +81,7 @@ [% FOREACH bookseller IN booksellersloop %] [% bookseller.name %] - Choose + Choose [% END %] @@ -98,7 +98,6 @@ [% END %]
- [% IF ( ordernumber ) %] [% END %] @@ -113,9 +112,6 @@
-
- [% INCLUDE 'acquisitions-menu.inc' %] -
[% INCLUDE 'intranet-bottom.inc' %] -- 1.7.10