From 7c4c150a96a0454ec99892d6928acf59efed0903 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 17 Nov 2023 17:42:33 +0000 Subject: [PATCH] Bug 35363: Update transfer order pop-up window with consistent footer markup This patch updates the "Transfer order" pop-up window so that it has a fixed footer consistent with other similar pop-up windows. In order to make navigation between pages within the pop-up window easier I've added a button in the footer which can take the user back to the previous step, including any necessary parameters. To test, apply the patch and go to Acquisitions. - Locate a vendor with a basket, and a basket with one or more orders. - On the basket detail page, click the "Transfer" link in the "Modify" column. - In the pop-up window, test each step: - Vendor search - Vendor selection - Basket selection - Confirm that at any step you can use the new button to go back to the previous step. Signed-off-by: David Nind --- acqui/transferorder.pl | 1 + .../prog/en/modules/acqui/transferorder.tt | 179 +++++++++++------- 2 files changed, 107 insertions(+), 73 deletions(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 1fa15be7b8..69597f4e7e 100755 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -94,6 +94,7 @@ if( $basketno && $ordernumber) { } $template->param( show_baskets => 1, + query => $query, basketsloop => \@basketsloop, basketfromname => $basketfrom->{basketname}, ); 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 d2314473f4..801aa6f8cb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -14,60 +14,36 @@

Transfer order

- [% IF ( bookselleridfrom ) %] -

Search for a vendor to transfer to

-
-
    -
  • From vendor: [% booksellerfromname | html %]
  • -
  • Basket: [% basketfromname | html %]
  • -
  • [% tp('noun', 'Order') | html %]: [% ordernumber | html %]
  • -
-
- [% ELSE %] -

Search for a vendor to transfer from

- [% END %] -
-
- - [% IF ( ordernumber ) %] - - [% END %] - [% IF ( bookselleridfrom ) %] - - [% END %] - - - -
-
+ [% IF ( show_baskets ) %] -

Baskets for [% booksellertoname | html %]

[% IF ( basketsloop ) %] - - - - - - - - - - - [% FOREACH basket IN basketsloop %] - - - - - - [% END %] - -
Basket (#)[% tp('basket created by', 'Created by') | html %]Date 
[% basket.basketname | html %] (#[% basket.basketno | html %])[% basket.createdby | html %][% basket.creationdate | $KohaDates %]Choose -
+
+

Baskets for [% booksellertoname | html %]

+ + + + + + + + + + + [% FOREACH basket IN basketsloop %] + + + + + + [% END %] + +
Basket (#)[% tp('basket created by', 'Created by') | html %]Date 
[% basket.basketname | html %] (#[% basket.basketno | html %])[% basket.createdby | html %][% basket.creationdate | $KohaDates %]Choose +
+
[% ELSE %]

There are no open baskets for this vendor.

[% END %] - [% END %] - [% IF ( ordersloop ) %] + [% ELSIF ( ordersloop ) %]

Orders for [% booksellerfromname | html %]

@@ -97,36 +73,89 @@ [% END %]
- [% END %] - [% IF ( do_search ) %] - [% IF ( bookselleridfrom ) %] -

Choose a vendor to transfer to

- [% ELSE %] -

Choose a vendor to transfer from

- [% END %] + [% ELSIF ( do_search ) %] [% IF booksellers.count %] - - - - - - - - - [% FOREACH bookseller IN booksellers %] - - - - - [% END %] - -
Name 
[% bookseller.name | html %]Choose
+ [% IF ( bookselleridfrom ) %] +

Choose a vendor to transfer to

+ [% ELSE %] +

Choose a vendor to transfer from

+ [% END %] +
+ + + + + + + + + [% FOREACH bookseller IN booksellers %] + + + + + [% END %] + +
Name 
[% bookseller.name | html %]Choose
+
[% ELSE %]

No results found.

[% END %] + [% ELSE %] + [% IF ( bookselleridfrom ) %] +

Search for a vendor to transfer to

+
+
    +
  • From vendor: [% booksellerfromname | html %]
  • +
  • Basket: [% basketfromname | html %]
  • +
  • [% tp('noun', 'Order') | html %]: [% ordernumber | html %]
  • +
+
+ [% ELSE %] +

Search for a vendor to transfer from

+ [% END %] +
+
+ + [% IF ( ordernumber ) %] + + [% END %] + [% IF ( bookselleridfrom ) %] + + [% END %] +
    +
  1. + + +
  2. +
+
+
[% END %] - + [% MACRO jsinclude BLOCK %] [% IF transferred %] @@ -142,6 +171,10 @@ $(".confirm_transfer").on("click",function(){ return confirm( _("Transfer order to this basket?") ); }); + $("#vendor_search_submit").on("click", function(e){ + e.preventDefault(); + $("#vendor_search_form").submit(); + }); }); [% END %] -- 2.30.2