From 6a2e718b61f79936e06a74b23dd38ed6ded0c2fc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Aug 2019 13:25:24 +0000 Subject: [PATCH] Bug 23434: Hold confirmation dialog problem if HoldsAutoFill is enabled This patch corrects a problem with hold confirmation dialogs on the checkin page when the HoldsAutoFill system preference is enabled and the item being checked in has a hold at another library. The confirmation dialog is converted to a modal to match other confirmation information. As part of this process two whole sections of the template have been removed because they were redundant. To test, apply the patch and test the following circumstances both with HoldsAutoFill enabled AND disabled: - A hold for a patron at your library - A hold for a patron not at your library - With HoldsAutoFill ON, both the "OK" and "Print slip and confirm" buttons should dismiss the modal without reloading the page. - A hold which is already marked 'Waiting' - An item which needs to be transferred - An item which has already been transferred In all cases the confirmation modal should appear with correct information. Signed-off-by: Martin Renvoize --- .../prog/en/modules/circ/returns.tt | 269 +++++++----------- 1 file changed, 98 insertions(+), 171 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index f93129d147..42d7a19089 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -57,58 +57,69 @@ [% END %] [% IF hold_auto_filled %] -
- [% IF ( reservenotes ) %] -

Notes: [% reservenotes | html %]

- [% END %] -

Hold filled for:

-
    -
  • - [% INCLUDE 'patron-title.inc' patron=patron %] - - [% patron.category.description | html %] -
  • - - [% INCLUDE display_holdpatron_address %] - [% IF ( patron.phone ) %] -
  • [% patron.phone | html %]
  • - [% END %] +
- - [% IF ( transfertodo ) %] -

Transfer to: [% Branches.GetName( destbranch ) | html %]

- [% ELSE %] -

Hold at [% Branches.GetName( destbranch ) | html %]

- [% END %] - - - Print - -
+ + + + + [% END # /IF hold_auto_filled %] + [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
Error: @@ -213,45 +224,47 @@ [% END # /IF wrongbranch %] - [% IF WrongTransfer && !transfertodo %] - - [% END # /IF WrongTransfer && !transfertodo %] + [% UNLESS ( hold_auto_filled && diffbranch ) %] + [% IF WrongTransfer && !transfertodo %] + + [% END # /IF WrongTransfer && !transfertodo %] + [% END # /UNLESS hold_auto_filled && diffbranch %] [% IF ( found ) %] [% IF ( waiting ) %] @@ -346,66 +359,6 @@
[% END # /IF waiting %] - [% IF ( diffbranch ) %] - -
-

Hold needing transfer found

-

[% itembarcode | html %]: [% title | html %]

-

Hold for:

-
    -
  • - [% patron.surname | html %], [% patron.firstname | html %] ([% patron.cardnumber | html %]) - [% patron.category.description | html %] -
  • - [% INCLUDE display_holdpatron_address %] - [% IF ( patron.phone ) %] -
  • [% patron.phone | html %]
  • - [% END %] - [% IF ( patron.email ) %] -
  • - [% IF ( transfertodo ) %] - [% patron.email | html %] - [% ELSE %] - [% patron.email | html %] - [% END %] -
  • - [% END %] - [% IF ( patron.debarred ) %] -
  • Patron is RESTRICTED
  • - [% END %] - [% IF ( patron.gonenoaddress ) %] -
  • Patron's address is in doubt
  • - [% END %] -
- - [% IF ( transfertodo ) %] -

Transfer to: [% Branches.GetName( destbranch ) | html %]

- [% ELSE %] -

Hold at [% Branches.GetName( destbranch ) | html %]

- [% END %] - -
- - - - - - [% FOREACH inputloo IN inputloop %] - - - - [% END %] - - - - - - - - -
-
- [% END # /IF diffbranch %] - [% IF transfer || needstransfer %]