From 4fa3ac8e233e0825d4fa1ef2f727827ee0228b75 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 9 Jul 2025 11:13:53 +0000 Subject: [PATCH] Bug 38661: (follow-up) Eliminate duplicate ids The id attribute should be unique on the page, so I'm changing it to a name attribute and updating the corresonding selector. Also, we can eliminate find() here: $(this).closest('form').find('input... ...because $(this) IS the form, so we can optimize a tiny bit by removing the find(). Signed-off-by: Owen Leonard --- .../prog/en/modules/tools/manage-marc-import.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index e1c25ae544c..34cc0bd30e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -388,7 +388,7 @@ [% INCLUDE 'csrf-token.inc' %] - + [% ELSIF ( batch_lis.import_status == 'cleaned' ) %] @@ -635,12 +635,12 @@ if ($(this).hasClass("batch_delete")) { return confirm(_("Are you sure you want to permanently delete this batch?")); } else { - if ($(this).closest('form').find('input#import_status').val() === "imported" ) { + if ($(this).find("input[name='import_status']").val() === "imported" ) { return confirm(_("This batch contains imported records. Are you sure you wish to clear all the reservoir records? This cannot be undone.")); } else { - return confirm(_("Clear all reservoir records staged in this batch? This cannot be undone.")); + return confirm(_("Clear all reservoir records staged in this batch? This cannot be undone.")); + } } - } }); [% IF job_enqueued %] setTimeout( -- 2.39.5