summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Korpel <marcel.korpel@gmail.com>2015-07-10 18:47:34 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-08-08 12:59:24 +0200
commit4c5a299e8078f357b14246c268e8793b27bd5679 (patch)
tree26282d759bbbf6897c532dfe0d243c99e14cbbcb
parent9cde6b0566390002d167703fa900129bb90e07d8 (diff)
downloadaur-4c5a299e8078f357b14246c268e8793b27bd5679.tar.gz
aur-4c5a299e8078f357b14246c268e8793b27bd5679.tar.xz
Only autofocus search field on the package search page
This needs to be disabled on package pages to be able to add a URL fragment after comment editing. Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--web/template/pkg_search_form.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 2d03cfa5..404d16ec 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -57,7 +57,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' autofocus="autofocus" />
+ <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' <?= (empty($tokens[1])) ? 'autofocus="autofocus"' : '' ?> />
</div>
<div>
<label for="id_out_of_date"><?= __('Out of Date'); ?></label>