From 353ae265ddb998fcb91b6c91718832dcd1d80e70 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Thu, 18 Aug 2022 20:24:57 +0000
Subject: [PATCH] Bug 31397: Set focus in first input when adding a new
 bibliographic framework

When adding a new bibliographic framework, the focus/cursor should be
in the first input field of the form: Framework code

To test:
* Add a new bibliographic framework from adminsitration > bibliographic
  MARC frameworks
  - cursur is in no field
* Apply patch
* Add another new framework
  - cursor is now in the first input field of the form: Framework code

https://bugs.koha-community.org/show_bug.cgi?id=27191

Signed-off-by: David Nind <david@davidnind.com>
---
 .../intranet-tmpl/prog/en/modules/admin/biblio_framework.tt     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
index 6162ebbd07..728de1cafd 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt
@@ -117,7 +117,7 @@ MARC frameworks &rsaquo; Administration &rsaquo; Koha
                 [% ELSE %]
                     <li>
                         <label for="frameworkcode" class="required">Framework code: </label>
-                        <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
+                        <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required focus" />
                         <span class="required">Required</span>
                     </li>
                 [% END %]
-- 
2.30.2