From: Kyle M Hall Date: Wed, 18 Nov 2015 18:53:03 +0000 (+0000) Subject: Bug 11360 - Disable barcode field and submit button when a hold is found X-Git-Tag: v16.11.00~828 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=872892b03cbc4de4e2be1c33e2e07b0bf72883a3;p=koha_ffzg 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 Signed-off-by: Jonathan Druart --- 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 f0d584bfef..dc86a344dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -38,6 +38,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 %]'); @@ -241,57 +246,95 @@ $(document).ready(function () { [% END %] [% IF ( found ) %] - - [% IF ( waiting ) %] - + [% END %] [% IF ( diffbranch ) %] @@ -404,7 +447,38 @@ $(document).ready(function () { [% IF ( reserved ) %] + +>>>>>>> Bug 11360 - Disable barcode field and submit button when a hold is found [% END %] [% END %]