From e7bfe2ffb5463faadf105f7b5f15cfd7edebe6bc 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. --- .../intranet-tmpl/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 f93129d147b..42d7a19089e 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:

- - - [% 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:

- - - [% 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 %]