From df8f4c944d3a30fe30f0d59bafc73d3b978b4544 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 18 Nov 2015 18:53:03 +0000 Subject: [PATCH] Bug 11360 - Disable barcode field and submit button when a hold is found At the moment when scanning in returns, it can be easy to miss a hold trap due to the fact that the barcode and submit are still active and the barcode field is focused on. A librarian who is focused on scanning can easily scan another item and pass over the form, which is equivalent to clicking the "ignore" button. Test Plan: 1) Apply this patch 2) Trap a hold, note the new modal 3) Check the hold in a second time 4) Note the new modal 5) For each modal, test each button Signed-off-by: Christopher Brannon --- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 293 +++++++++++++------- 1 file changed, 197 insertions(+), 96 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 6a9f868..480cb29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -23,6 +23,11 @@ function Dopop(link) { $("#barcode").focus(); } $(document).ready(function () { + $(".modal").modal({ backdrop: 'static' }).on('shown', function() { + $("#barcode").prop("disabled", true); + }).on('hidden', function() { + $("#barcode").prop("disabled", false).focus(); + }); [% IF print_slip %] Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); @@ -221,56 +226,99 @@ $(document).ready(function () { [% END %] [% IF ( found ) %] - - [% IF ( waiting ) %] - + [% END %] [% IF ( diffbranch ) %] @@ -382,56 +430,109 @@ $(document).ready(function () { [% IF ( reserved ) %] - - -
-

Hold found

-

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

- [% IF ( reservenotes ) %]

Notes: [% reservenotes %]

[% END %] -
Hold for:
-
    -
  • - [% borsurname %], [% borfirstname %] - ([% borcnum %])
  • -
  • [% borstnum %] [% boraddress %]
    - [% IF ( boraddress2 ) %][% boraddress2 %]
    [% END %] - [% borcity %] [% borzip %]
  • - [% IF ( borphone ) %]
  • [% borphone %]
  • [% END %] - [% IF ( boremail ) %]
  • [% IF ( transfertodo ) %][% boremail %][% ELSE %][% boremail %][% END %]
  • [% END %] -[% IF ( debarred ) %]
  • Patron is RESTRICTED
  • [% END %] -[% IF ( gonenoaddress ) %]
  • Patron's address is in doubt
  • [% END %] -
- [% IF ( transfertodo ) %] -

Transfer to: [% destbranchname %]

- [% ELSE %] -

Hold at [% destbranchname %]

- [% END %] -
- - [% IF ( transfertodo ) %] - - - [% ELSE %] - - - [% END %] - - [% FOREACH inputloo IN inputloop %] - - - [% END %] - - - - - - - - - - -
-
+ [% END %] [% END %] -- 1.7.10.4