From e3f6196bf1fa6fbda125d884ef8e489a93c661a0 Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Mon, 1 Oct 2018 01:30:58 +0000 Subject: [PATCH] Bug 21346: Update/Fix dialogs - Fix hold waiting TEST PLAN 1) Place a hold on an item from Branch A to be delivered to Branch B. 2) Checkin the item at Branch A and confifm the hold to transfer. 3) Be human and make a mistake. Login as Branch C and check the item in 4) Note the great modal to redirect the hold. Note that the old dialog is behind it! 5) Check in the item at Branch B to put it in waiting status. 6) Be human and make another mistake. Login as Branch C and check the item in. Notice it does nothing except a local use. 7) Check out an item at Branch A. 8) Check in the item at Branch B. Notice the classic blue transfer dialog at the top of page. 9) Apply the patch. 10) Check everything in at their branches. 11) Repeat steps 1-8. Now note the classic dialogs are gone and nothing but the modals left. Note that the waiting hold will now reroute back the place it should be waiting. --- circ/returns.pl | 2 + .../intranet-tmpl/prog/en/modules/circ/returns.tt | 68 +++++++++------------- 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index c2f20ef..cbfa556 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -448,6 +448,8 @@ if ( $messages->{'ResFound'}) { if ( $reserve->{'ResFound'} eq "Waiting" ) { $template->param( waiting => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ), + transfertodo => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), + reserved => 1, ); } elsif ( $reserve->{'ResFound'} eq "Reserved" ) { $template->param( 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 74b24f6..0e524ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -170,36 +170,35 @@ [% END %] - -[% IF ( WrongTransfer ) %] -
- -

Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]

-

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

- - -[% IF ( patron.cardnumber ) %]
Hold for:
- - -
- - - - - - - - - - -
- [% END %]
+ +[% IF ( transfer || ( WrongTransfer && !reserved ) ) %] + [% END %] [% IF ( found ) %] @@ -334,15 +333,6 @@ - - [% END %] - - [% IF ( transfer ) %] - -
-

Please return item to: [% Branches.GetName( returnbranch ) | html %]

-

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

-

[% END %] -- 2.1.4