From dc7c885f70de49837a2ffa18dc143e592c545d7f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 22 Apr 2026 08:57:27 -0400 Subject: [PATCH] Bug 42439: Remove event attributes from label-edit-batch.tt This patch removes an "onload" event attribute from the label batch edit template. An "onload" event attribute on the body tag can be easily moved to the $(document).ready block. To test, apply the patch and go to Cataloging -> Label creator -> Label batches -> New label batch. As soon as the page loads the "Add by barcodes" textarea should get focus. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass (cherry picked from commit b8832e7d7e7563e52611958a17d970576e9c710f) Signed-off-by: Jacob O'Mara Signed-off-by: Wainui Witika-Park --- .../intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index aca2b0a451..6f3fe73212 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -18,7 +18,7 @@ [% INCLUDE 'doc-head-close.inc' %] - + [% WRAPPER 'header.inc' %] [% INCLUDE 'cat-search.inc' %] [% END %] @@ -340,6 +340,7 @@ } $(document).ready(function() { + dofocus(); $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); [% IF table_loop %] $("#description").show();