]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 578256 - Autocomplete user names in the search UI
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 18 Sep 2010 23:21:44 +0000 (16:21 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 18 Sep 2010 23:21:44 +0000 (16:21 -0700)
r=pyrzak, a=mkanat

template/en/default/search/form.html.tmpl

index e1f8a5f686dbd31c6c8557eeb8c0452541bc4de2..f519c8f69dca60e7b7bc0e818335cb0dfbb8488d 100644 (file)
@@ -342,7 +342,19 @@ TUI_hide_default('information_query');
           [% " selected" IF default.emailtype.$n == qv.name %]>[% qv.description %]</option>
       [% END %]
       </select>
-      <input name="email[% n %]" class="email" id="email[% n %]" value="[% default.email.$n FILTER html %]">
+      [% IF feature_enabled('jsonrpc') %]
+        <div id="email[% n %]_autocomplete">
+      [% END %]
+      <input name="email[% n %]" class="email" id="email[% n %]" 
+             value="[% default.email.$n FILTER html %]">
+      [% IF feature_enabled('jsonrpc') %]
+        <div id="email[% n %]_autocomplete_container"></div>
+        </div>
+        <script type="text/javascript">
+          YAHOO.bugzilla.userAutocomplete.init( "email[% n %]", 
+                    "email[% n %]_autocomplete_container");
+        </script>
+      [% END %]
     </div>
   [% END %]
    [% Hook.process('email_numbering_end') %]