[aur-dev] [PATCH] Autofocus username input field at login screen
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@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
On Sun, 24 May 2015 at 22:51:19, Gordian Edenhofer wrote:
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. [...]
We use XHTML 1.0, not HTML5. It probably works in most browsers anyway but we should at least use 'autofocus="autofocus"' for XHTML compliance and mention it in the commit message.
On Wed, 2015-05-27 at 10:04 +0200, Lukas Fleischer wrote:
On Sun, 24 May 2015 at 22:51:19, Gordian Edenhofer wrote:
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. [...]
We use XHTML 1.0, not HTML5. It probably works in most browsers anyway but we should at least use 'autofocus="autofocus"' for XHTML compliance and mention it in the commit message.
Sorry, I forgot about that! Shell I resubmit a correct patch?
On Wed, 27 May 2015 at 10:34:44, Gordian Edenhofer wrote:
[...]
We use XHTML 1.0, not HTML5. It probably works in most browsers anyway but we should at least use 'autofocus="autofocus"' for XHTML compliance and mention it in the commit message.
Sorry, I forgot about that! Shell I resubmit a correct patch?
Yes, please!
On Wed, 2015-05-27 at 11:13 +0200, Lukas Fleischer wrote:
On Wed, 27 May 2015 at 10:34:44, Gordian Edenhofer wrote:
[...]
We use XHTML 1.0, not HTML5. It probably works in most browsers anyway but we should at least use 'autofocus="autofocus"' for XHTML compliance and mention it in the commit message.
Sorry, I forgot about that! Shell I resubmit a correct patch?
Yes, please!
I have "rewritten" the patch and tested it again in chrome, firefox, epiphany and midori. Furthermore I merged both patch requests since there is no reason for accepting one but not the other. Best regards, Gordian Edenhofer
participants (2)
-
Gordian Edenhofer
-
Lukas Fleischer