From 57613239447e30c649f18cc47e80eedc63610aaa Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 11 Jun 2012 13:56:58 +0200 Subject: [PATCH] Bug 5349: (follow-up) run transferorder.pl in a popup Signed-off-by: Marc Veron Signed-off-by: Mathieu Saby Signed-off-by: sonia Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- acqui/transferorder.pl | 5 +--- .../prog/en/modules/acqui/basket.tt | 10 +++++-- .../prog/en/modules/acqui/parcel.tt | 9 ++++++- .../prog/en/modules/acqui/transferorder.tt | 26 ++++++++----------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 27c450955a..6a0c63e901 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/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index ea7f5d00ff..1c741203ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -55,7 +55,7 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber; } } - + function confirm_delete_biblio(ordernumber, biblionumber) { var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?")); if (is_confirmed) { @@ -63,6 +63,12 @@ } } + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> [% ELSE %] @@ -366,7 +372,7 @@ Modify [% UNLESS (books_loo.order_received) %]
- Transfer + Transfer [% END %] 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 6725948117..174a6bf830 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -86,6 +86,13 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]"; } } + + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> @@ -216,7 +223,7 @@ Receive
- Transfer + Transfer [% IF ( loop_order.left_holds_on_order ) %] 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 f694c1f580..c44b583437 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' %] -- 2.39.5