From 6f6f7e15f8c391e031a1ec67bbcedfe8d5533d1b 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 Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../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 0733fca6f4..be37f1e474 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.39.5