summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2010-05-12 19:08:21 +0200
committerDavid Lawrence <dkl@redhat.com>2010-05-12 19:08:21 +0200
commit5977f8c2566a95fc5e2c3c05fe0551c47f718810 (patch)
tree460cc16b86787477a3b80fd5000e3e11926c3086
parent955abb3e5a2421078b93daa7bc6a4d89b6a56dcb (diff)
downloadbugzilla-5977f8c2566a95fc5e2c3c05fe0551c47f718810.tar.gz
bugzilla-5977f8c2566a95fc5e2c3c05fe0551c47f718810.tar.xz
Bug 486050: Bugzilla should prefill quicksearch box when showing search results from a quicksearch
r/a=mkanat
-rwxr-xr-xbuglist.cgi3
-rw-r--r--template/en/default/global/common-links.html.tmpl3
2 files changed, 5 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 576b95572..65eb6f380 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -1163,6 +1163,9 @@ if ($dotweak && scalar @bugs) {
# the "Remember search as" field.
$vars->{'defaultsavename'} = $cgi->param('query_based_on');
+# If we did a quick search then redisplay the previously entered search
+# string in the text field.
+$vars->{'quicksearch'} = $searchstring;
################################################################################
# HTTP Header Generation
diff --git a/template/en/default/global/common-links.html.tmpl b/template/en/default/global/common-links.html.tmpl
index 6ad638f72..fe665df67 100644
--- a/template/en/default/global/common-links.html.tmpl
+++ b/template/en/default/global/common-links.html.tmpl
@@ -34,7 +34,8 @@
onsubmit="if (this.quicksearch.value == '')
{ alert('Please enter one or more search terms first.');
return false; } return true;">
- <input class="txt" type="text" id="quicksearch[% qs_suffix FILTER html %]" name="quicksearch">
+ <input class="txt" type="text" id="quicksearch[% qs_suffix FILTER html %]" name="quicksearch"
+ value="[% quicksearch FILTER html %]">
<input class="btn" type="submit" value="Search"
id="find[% qs_suffix FILTER html %]">
[%-# Work around FF bug: keep this on one line %]</form>