From 862ed65ba6fa41e68855a82d31fa33a8f4ad8420 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 8 Mar 2023 12:04:57 +0000 Subject: [PATCH] Bug 33152: Add focus to search field This patch adds focus to the search field for a new SQL report from mana. Test plan: 1) Navigate to Reports > Create from SQL 2) Click on the new report dropdown and select "New SQL from Mana" 3) Observe that there is no focus on the input and the user needs to click to start typing 4) Apply patch 5) Repeat steps 1-2 6) There should now be focus on the input and typing can be started immediately --- .../prog/en/modules/reports/guided_reports_start.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 0733fca6f47..be37f1e474e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -2187,6 +2187,10 @@ mana_use( $(this).data("report_id") ); }); + $("#mana_search_result").on("shown.bs.modal", function(){ + $("#mana_search_field").focus(); + }); + $("#mana_search_result").on("hide.bs.modal", function(){ $("#mana_result_content").html(""); $("#mana_search_field").val(""); -- 2.37.1 (Apple Git-137.1)