From 949f7ee4f9be8e96c70a2bd1fedd8d4436728fa4 Mon Sep 17 00:00:00 2001
From: Peter Goodhall <peter@magicbug.co.uk>
Date: Thu, 22 Jun 2023 16:09:25 +0100
Subject: [PATCH 1/2] [Login] make the username the default focused field.

Fixes #2221
---
 application/views/user/login.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/views/user/login.php b/application/views/user/login.php
index 3847cb66..7ce6d877 100644
--- a/application/views/user/login.php
+++ b/application/views/user/login.php
@@ -40,7 +40,7 @@ body {
                 <div>
                     <label for="floatingInput"><strong><?php echo lang('account_username'); ?></strong></label>
                     <input type="text" name="user_name" class="form-control" id="floatingInput" placeholder="<?php echo lang('account_username'); ?>"
-                        value="<?php echo $this->input->post('user_name'); ?>">
+                        value="<?php echo $this->input->post('user_name'); ?>" autofocus>
                 </div>
                 <div>
                     <label for="floatingPassword"><strong><?php echo lang('account_password'); ?></strong></label>

From 8a75a2bfdea529ec551abf6c4fa3569e62613614 Mon Sep 17 00:00:00 2001
From: Peter Goodhall <peter@magicbug.co.uk>
Date: Thu, 22 Jun 2023 16:12:31 +0100
Subject: [PATCH 2/2] [Forgot Password] Set the email field as the automatic
 focus

---
 application/views/user/forgot_password.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/views/user/forgot_password.php b/application/views/user/forgot_password.php
index e26a5131..e33b4e23 100644
--- a/application/views/user/forgot_password.php
+++ b/application/views/user/forgot_password.php
@@ -44,7 +44,7 @@ input[type="email"] {
                         <div class="form-group">
                             <div class="input-group">
                                 <span class="input-group-addon"><i class="glyphicon glyphicon-envelope color-blue"></i></span>
-                                <input id="email" name="email" placeholder="<?php echo lang('account_email_address'); ?>" class="form-control" type="email">
+                                <input id="email" name="email" placeholder="<?php echo lang('account_email_address'); ?>" class="form-control" type="email" autofocus>
                             </div>
                         </div>
                         <div class="form-group">