From 1ab23ec0cca62fb7ecc2378c7dd71b18a090f206 Mon Sep 17 00:00:00 2001
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Date: Wed, 11 Mar 2020 03:38:44 +0000
Subject: [PATCH] Bug 24844: Focus syspref searchbar

To test:
1) Go to Administration
2) Notice neither of the syspref search bars are focussed so you have to
click inside one to begin searching
3) Apply patch and refresh page
4) Notice the header syspref search bar is now focussed so you can begin
typing straight away

Sponsored-by: Catalyst IT

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=2484
---
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
index 860d08fd2c..87522295b9 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
@@ -243,4 +243,12 @@
     </div>
 </div>
 
+[% MACRO jsinclude BLOCK %]
+    <script>
+        $(document).ready(function(){
+            $("input[class='head-searchbox'][name='searchfield']").focus();
+        });
+    </script>
+[% END %]
+
 [% INCLUDE 'intranet-bottom.inc' %]
-- 
2.11.0