From a8fb7067706344a14da37efb4bf1f6b078e80670 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 26 Feb 2020 17:38:53 +0100 Subject: [PATCH] Bug 24510: Code cleaning Additional test plan: Create 3 clubs: abc adf axy place a hold for on of those club, search for a club 'a' you will get the focus on the "Clubs" tab Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- .../prog/en/modules/reserve/request.tt | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 67a2955884..f58cb21981 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -963,27 +963,16 @@ columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] $(document).ready(function() { - [% UNLESS clubs %] - $('#circ_holds_select').tabs({ - active: 0, - activate: function(){ - $(this).find("input.focus").focus(); - }, - create: function(){ - $(this).find("input.focus").focus(); - } - }); - [% ELSE %] - $('#circ_holds_select').tabs({ - active: 1, - activate: function(){ - $(this).find("input.focus").focus(); - }, - create: function(){ - $(this).find("input.focus").focus(); - } - }); - [% END %] + [% SET active = clubs ? 1 : 0 %] + $('#circ_holds_select').tabs({ + active: [% active %], + activate: function(){ + $(this).find("input.focus").focus(); + }, + create: function(){ + $(this).find("input.focus").focus(); + } + }); function ToggleHoldsToPlace() { if ( $("#requestany").prop('checked') ) { $("#holds_to_place_count").prop('disabled', false); -- 2.39.5