From d16bcb70e7066b6e4c908f560affb281018e788e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 3 Jan 2017 15:08:32 +0000 Subject: [PATCH] Bug 17812 - Return focus to barcode field after toggling on-site checkouts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch changes the behavior of the checkout form so that after checking boxes in the "checkout settings" panel the cursor focus is automatically moved to the barcode field. To test, apply the patch and enable OnSiteCheckouts and decreaseLoanHighHolds system preferences. - Open any patron account in circulation. - Expand the "Checkout settings" panel. - Click the label or checkbox for "Automatic renewal", "Don't decrease checkout length based on holds" and "On-site checkout" - Confirm that the focus has moved to the barcode field. Works as advertised. Signed-off-by: Marc Véron Signed-off-by: Marjorie Barry-Vila Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 8 ++++---- koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index e133b95181..d47419643e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -643,7 +643,7 @@ No patron matched [% message | html %] [% IF NEEDSCONFIRMATION %] [% ELSE %] - + [% END %] @@ -658,9 +658,9 @@ No patron matched [% message | html %] [% END %] [% ELSE %] [% IF override_high_holds %] - + [% ELSE %] - + [% END %] [% END %] @@ -677,7 +677,7 @@ No patron matched [% message | html %] [% ELSE %] - + [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index 4683b5dd54..cbe274b212 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -77,6 +77,10 @@ $(document).ready(function() { } }); + $(".circ_setting").on("click",function(){ + $("#barcode").focus(); + }); + }); function export_checkouts(format) { -- 2.39.5