[aur-dev] [PATCH] Autofocus searchbox at package search
At the package search page, the user is requested to enter some keyword for the search. Until now it was neccessary to click the field in which the input should be placed. 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/template/pkg_search_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index 7428250..aafd3bf 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 /> </div> <div> <label for="id_out_of_date"><?= __('Out of Date'); ?></label> -- 2.4.1
On 25/05, Gordian Edenhofer wrote:
<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 />
Seems you sent the old patch again? -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
On 27/05, Johannes Löthberg wrote:
On 25/05, Gordian Edenhofer wrote:
<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 />
Seems you sent the old patch again?
Err ignore me, I'm blind. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
participants (2)
-
Gordian Edenhofer
-
Johannes Löthberg