summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-01-20 23:15:06 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2014-01-20 23:15:06 +0100
commite02e3bc792293af9460da9c9d6b9185b94c5307f (patch)
treefccf99d2e3fdcfa07f501be4f6a5e1de2ff22161 /template/en/default/search
parenta59fdab6cb0c0249a606d60b5d565aecdbaf79cb (diff)
downloadbugzilla-e02e3bc792293af9460da9c9d6b9185b94c5307f.tar.gz
bugzilla-e02e3bc792293af9460da9c9d6b9185b94c5307f.tar.xz
Bug 958825: Use HTML5's attribute "autofocus" instead of onload="element.focus()"
r/a=justdave
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/search-specific.html.tmpl22
1 files changed, 4 insertions, 18 deletions
diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl
index e3fd9ef5a..54a769b81 100644
--- a/template/en/default/search/search-specific.html.tmpl
+++ b/template/en/default/search/search-specific.html.tmpl
@@ -91,28 +91,14 @@ for "crash secure SSL flash".
<label for="content">Words:</label>
</th>
<td>
- <input name="content" size="40" id="content"
- value="[% default.content.0 FILTER html %]">
- <script type="text/javascript"> <!--
- document.forms['queryform'].content.focus();
- // -->
- </script>
+ <input name="content" size="40" id="content" autofocus
+ value="[% default.content.0 FILTER html %]"
+ [%- " required" UNLESS Param('search_allow_no_criteria') %]>
</td>
</tr>
<tr>
<td></td>
- <td>
-
- [% IF Param('search_allow_no_criteria') %]
- <input type="submit" id="search" value="Search">
- [% ELSE %]
- <input type="submit" id="search" value="Search"
- onclick="if (this.form.content.value == '')
- {alert('The Words field cannot be empty. You have to ' +
- 'enter at least one word in your search criteria.');
- return false;} return true;">
- [% END %]
- </td>
+ <td><input type="submit" id="search" value="Search"></td>
</tr>
</table>
</form>