[aur-dev] [PATCH] Autofocus input fields at login and package-search
At the login and the package search page, the user is promted to provide some input. Until now it was neccessary to first click the field in which the input should be placed. This can be simplified with HTML5 using the autofocus attribute of the input element, though not included in XHTML 1.0, the attribute was at least given a value to comply with the standard. Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com> --- web/html/login.php | 2 +- web/template/pkg_search_form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/html/login.php b/web/html/login.php index 94da559..f898a57 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="autofocus" /> </p> <p> <label for="id_password"><?= __('Password') . ':'; ?></label> diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index 7428250..b731674 100644 --- a/web/template/pkg_search_form.php +++ b/web/template/pkg_search_form.php @@ -70,7 +70,7 @@ $per_page = array(50, 100, 250); </div> <div> <label for="id_q"><?= __("Keywords"); ?></label> - <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' /> + <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' autofocus="autofocus" /> </div> <div> <label for="id_out_of_date"><?= __('Out of Date'); ?></label> -- 2.4.1
Please use the -v2 argument (also -v3, -v4, ...) to git format-patch or git send-email next time so the subject will look like this: [PATCH v2] Also I'd suggest using --in-reply-to with a message ID from your old thread so that threading works as expected and it's easier to view previous discussion/versions. I tend to use the ID that started the thread so that each patch version gets it's own sub thread (well kind of), but they are nicely grouped. On 27.05.2015 12:17, Gordian Edenhofer wrote:
[...]
Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com> ---
I like to include a short summary of the changes to the previous version here so people don't have to remember what they should check for. This is especially helpful for larger patches that might not be reviewed as quickly. Something like the following: v2: - merge login and package search change into one patch - use XHTML style option You can easily add this by using the --annotate option of send-email or by editing the file generated by format-patch. Note that such comments will not be included in the commit (if it's applied from the mail) since they are after the --- marker.
On Wed, 2015-05-27 at 13:33 +0200, Florian Pritz wrote:
Please use the -v2 argument (also -v3, -v4, ...) to git format-patch or git send-email next time so the subject will look like this: [PATCH v2]
Also I'd suggest using --in-reply-to with a message ID from your old thread so that threading works as expected and it's easier to view previous discussion/versions. I tend to use the ID that started the thread so that each patch version gets it's own sub thread (well kind of), but they are nicely grouped.
On 27.05.2015 12:17, Gordian Edenhofer wrote:
[...]
Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com> ---
I like to include a short summary of the changes to the previous version here so people don't have to remember what they should check for. This is especially helpful for larger patches that might not be reviewed as quickly.
Something like the following:
v2: - merge login and package search change into one patch - use XHTML style option
You can easily add this by using the --annotate option of send-email or by editing the file generated by format-patch. Note that such comments will not be included in the commit (if it's applied from the mail) since they are after the --- marker.
Thanks for the hints. I will keep them in mind when submitting further patches.
On Wed, 2015-05-27 at 13:52 +0200, Gordian Edenhofer wrote:
On Wed, 2015-05-27 at 13:33 +0200, Florian Pritz wrote:
Please use the -v2 argument (also -v3, -v4, ...) to git format -patch or git send-email next time so the subject will look like this: [PATCH
v2]
Also I'd suggest using --in-reply-to with a message ID from your old thread so that threading works as expected and it's easier to view previous discussion/versions. I tend to use the ID that started the thread so that each patch version gets it's own sub thread (well kind of), but they are nicely grouped.
On 27.05.2015 12:17, Gordian Edenhofer wrote:
[...]
Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com> ---
I like to include a short summary of the changes to the previous version here so people don't have to remember what they should check for. This is especially helpful for larger patches that might not be reviewed
as quickly.
Something like the following:
v2: - merge login and package search change into one patch - use XHTML style option
You can easily add this by using the --annotate option of send -email or by editing the file generated by format-patch. Note that such comments will not be included in the commit (if it's applied from the mail) since they are after the --- marker.
Thanks for the hints. I will keep them in mind when submitting further patches.
Is it too optimistic to assume this patch might be included in AUR 4.0 or is it unlikely it will be added at this point? Kind regards, Gordian
On Fri, 12 Jun 2015 at 00:08:27, Gordian Edenhofer wrote:
[...] Is it too optimistic to assume this patch might be included in AUR 4.0 or is it unlikely it will be added at this point?
Thanks for bumping this thread. Your patch got lost in all the emails I had to deal with when returning from holidays. I applied it locally and will merge it into master tomorrow. You can already test it on aur4.archlinux.org. Thanks!
Kind regards, Gordian
On Fri, 2015-06-12 at 00:18 +0200, Lukas Fleischer wrote:
On Fri, 12 Jun 2015 at 00:08:27, Gordian Edenhofer wrote:
[...] Is it too optimistic to assume this patch might be included in AUR 4.0 or is it unlikely it will be added at this point?
Thanks for bumping this thread. Your patch got lost in all the emails I had to deal with when returning from holidays. I applied it locally and will merge it into master tomorrow. You can already test it on aur4.archlinux.org. Thanks!
Kind regards, Gordian
Many thanks for the quick reply. I am glad to see those minor additions in action. Kind regards, Gordian
participants (3)
-
Florian Pritz
-
Gordian Edenhofer
-
Lukas Fleischer