summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/field.html.tmpl16
-rw-r--r--template/en/default/search/form.html.tmpl1
2 files changed, 10 insertions, 7 deletions
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl
index d3f71ae3f..dd5e1fac7 100644
--- a/template/en/default/search/field.html.tmpl
+++ b/template/en/default/search/field.html.tmpl
@@ -35,20 +35,22 @@
types = types,
selected = type_selected
%]
- <div id="keyword_container">
+ <div id="[% field.name FILTER html %]_container">
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
value="[% value FILTER html %]">
- <div id="keyword_autocomplete"></div>
+ <div id="[% field.name FILTER html %]_autocomplete"></div>
</div>
<script type="text/javascript" defer="defer">
- YAHOO.bugzilla.keyword_array = [
- [%- FOREACH keyword = all_keywords %]
- [%-# %]"[% keyword.name FILTER js %]"
+ if (typeof YAHOO.bugzilla.field_array === "undefined")
+ YAHOO.bugzilla.field_array = [];
+ YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
+ [%- FOREACH val = possible_values %]
+ [%-# %]"[% val FILTER js %]"
[%- "," IF NOT loop.last %][% END %]];
- YAHOO.bugzilla.keywordAutocomplete.init('[% field.name FILTER js %]',
- 'keyword_autocomplete');
+ YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
+ '[% field.name FILTER js %]_autocomplete');
</script>
[% CASE constants.FIELD_TYPE_DATETIME %]
[% INCLUDE "bug/field-label.html.tmpl"
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index 4b7ac4b07..fc6f597cf 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -142,6 +142,7 @@ TUI_hide_default('information_query');
%]
<div class="search_field_row">
[% type = field_container.field.name _ "_type" %]
+ [% possible_values = field_container.field.name == 'keywords' ? all_keywords : [] %]
[% INCLUDE "search/field.html.tmpl"
field => field_container.field
types => field_container.qtypes || query_types