From a7565853abfe3edae1865c89a2070905521ab2d0 Mon Sep 17 00:00:00 2001 From: Slava Shishkin Date: Fri, 3 Jun 2022 17:47:46 +0300 Subject: [PATCH] Bug 30884: Fix jQuery selector to correctly detect active tab To reproduce: 1. Go to /tools/modborrowers.pl and fill form Card number list with data and click Continue. 2. It should give "No patron card numbers or borrowernumbers given." warning. 3. Using the browser inspector tool see that post fields cardnumberlist or borrowernumberlist is sent with empty data. Apply the patch, and then: 1. Fill form Card number or Borrowernumber list and click Continue. 2. Get the result: table with patrons for editing or warning about not found number. 3. Using the inspector tool see that request has data from the active tab in the form. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt index 18cf51e63a..4309ae87f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt @@ -476,7 +476,7 @@ }); $("#patron_batchmod_form").on("submit", function(){ /* Reset form fields on inactive tabs */ - var tab = $(this).find('.ui-tabs-active:first a').attr('href'); + var tab = $(this).find('ul.nav-tabs li.active a').attr('href'); if ( tab == '#usecardnumber' ) { $("#borrowernumberuploadfile, #patron_list_id, #borrowernumberlist").val(""); } else if ( tab == '#useborrowernumber' ) { -- 2.35.1