From 571ec9a94b9323cd23f9012d9b1f837fd9bf974c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Wed, 4 Nov 2015 10:13:46 +0100 Subject: [PATCH] Bug 15117: Transfer Order: Better user information and translation handling While transferring an order, a untranslatable JavaScript confirmation dialog pops up. This patch moves the information about the order to be transferred to the top of the screen to better inform the user what order is to be transferred, and simplifies the confirmation dialog. To test: - Apply patch - Transfer an order from a basket to another basket - Verify, that on top of the screen an information is displayed about which order from which vendor and basket is to be transferred - Verify that the transfer works OK - Update a po lang file and confirm you see the string and you are able to translate it. Signed-off-by: Frederic Demians Dialog box with readable & translatable info. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- acqui/transferorder.pl | 4 ++++ .../prog/en/modules/acqui/transferorder.tt | 21 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 3e8bdc84ec..0f58887130 100755 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -49,8 +49,10 @@ my $op = $input->param('op'); my $query = $input->param('query'); my $order = GetOrder($ordernumber); +my $basketfromname = ''; if($order) { my $basket = GetBasket($order->{basketno}); + $basketfromname = $basket->{basketname}; $bookselleridfrom = $basket->{booksellerid} if $basket; } @@ -65,6 +67,7 @@ if($booksellerto){ $booksellertoname = $booksellerto->{name}; } + if( $basketno && $ordernumber) { # Transfer order and exit my $order = GetOrder( $ordernumber ); @@ -132,6 +135,7 @@ $template->param( booksellertoname => $booksellertoname, ordernumber => $ordernumber, basketno => $basketno, + basketfromname => $basketfromname, ); output_html_with_http_headers $input, $cookie, $template->output; 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 0ba9a0eb78..261d658332 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -12,6 +12,18 @@ //]]> [% END %] + +[% IF ( bookselleridfrom ) %] + +[% END %] + + @@ -20,6 +32,13 @@
[% IF ( bookselleridfrom ) %]

Search for a vendor to transfer to

+
+
    +
  • From vendor: [% booksellerfromname %]
  • +
  • Basket: [% basketfromname %]
  • +
  • Order: [% ordernumber %]
  • + +
[% ELSE %]

Search for a vendor to transfer from

[% END %] @@ -53,7 +72,7 @@ [% basket.basketname %] (#[% basket.basketno %]) [% basket.createdby %] [% basket.creationdate %] - Choose + Choose [% END %] -- 2.39.5