From 1e1cf2702f2d13cec1d21f7fe5df706d3e988aac 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: Mason James --- .../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 36fb512166..0fd4051063 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -673,7 +673,7 @@ No patron matched [% message | html %] [% IF NEEDSCONFIRMATION %] [% ELSE %] - + [% END %] @@ -688,9 +688,9 @@ No patron matched [% message | html %] [% END %] [% ELSE %] [% IF override_high_holds %] - + [% ELSE %] - + [% END %] [% END %] @@ -707,7 +707,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 37588e9db3..8414022b09 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -79,6 +79,10 @@ $(document).ready(function() { } }); + $(".circ_setting").on("click",function(){ + $("#barcode").focus(); + }); + }); function export_checkouts(format) { -- 2.39.5