[aur-dev] [PATCH] Autofocus username input field at login screen

Gordian Edenhofer gordian.edenhofer at gmail.com
Sun May 24 20:51:19 UTC 2015


At the login page, the user is promted for the username and the
corresponding password. At this point the user is required to
click the field in which he should place the input.
This can be easily simplified with HTML5 using the autofocus
attribute of the input element.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer at gmail.com>
---
 web/html/login.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/html/login.php b/web/html/login.php
index 94da559..a4ce8c8 100644
--- a/web/html/login.php
+++ b/web/html/login.php
@@ -29,7 +29,7 @@ html_header('AUR ' . __("Login"));
 			<?php endif; ?>
 			<p>
 				<label for="id_username"><?= __('Username') . ':'; ?></label>
-				<input id="id_username" type="text" name="user" size="30" maxlength="<?= config_get_int('options', 'username_max_len'); ?>" value="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" />
+				<input id="id_username" type="text" name="user" size="30" maxlength="<?= config_get_int('options', 'username_max_len'); ?>" value="<?php if (isset($_POST['user'])) { print htmlspecialchars($_POST['user'], ENT_QUOTES); } ?>" autofocus />
 			</p>
 			<p>
 				<label for="id_password"><?= __('Password') . ':'; ?></label>
-- 
2.4.1


More information about the aur-dev mailing list