diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2014-01-20 23:15:06 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2014-01-20 23:15:06 +0100 |
commit | e02e3bc792293af9460da9c9d6b9185b94c5307f (patch) | |
tree | fccf99d2e3fdcfa07f501be4f6a5e1de2ff22161 /template/en/default/admin | |
parent | a59fdab6cb0c0249a606d60b5d565aecdbaf79cb (diff) | |
download | bugzilla-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/admin')
4 files changed, 5 insertions, 8 deletions
diff --git a/template/en/default/admin/milestones/create.html.tmpl b/template/en/default/admin/milestones/create.html.tmpl index 78ef49a8a..d15e43d55 100644 --- a/template/en/default/admin/milestones/create.html.tmpl +++ b/template/en/default/admin/milestones/create.html.tmpl @@ -18,7 +18,6 @@ title = title subheader = subheader style_urls = ['skins/standard/admin.css'] - onload = "document.forms['f'].milestone.focus()" %] <form name="f" method="post" action="editmilestones.cgi"> @@ -26,12 +25,11 @@ <tr> <th><label for="milestone">Milestone:</label></th> <td><input id="milestone" size="64" maxlength="64" name="milestone" - value=""></td> + autofocus></td> </tr> <tr> <th><label for="sortkey">Sortkey:</label></th> - <td><input id="sortkey" size="20" maxlength="20" name="sortkey" - value=""></td> + <td><input id="sortkey" size="20" maxlength="20" name="sortkey"></td> </tr> </table> <input type="submit" id="create" value="Add"> diff --git a/template/en/default/admin/users/create.html.tmpl b/template/en/default/admin/users/create.html.tmpl index 1ca2eb791..279c610a7 100644 --- a/template/en/default/admin/users/create.html.tmpl +++ b/template/en/default/admin/users/create.html.tmpl @@ -15,7 +15,6 @@ [% PROCESS global/header.html.tmpl title = "Add user" style_urls = ['skins/standard/editusers.css'] - onload = "document.forms['f'].login.focus()" doc_section = "useradmin.html#createnewusers" %] diff --git a/template/en/default/admin/users/search.html.tmpl b/template/en/default/admin/users/search.html.tmpl index a1bc2809c..97431bcad 100644 --- a/template/en/default/admin/users/search.html.tmpl +++ b/template/en/default/admin/users/search.html.tmpl @@ -18,7 +18,6 @@ [% PROCESS global/header.html.tmpl title = "Search users" style_urls = ['skins/standard/editusers.css'] - onload = "document.forms['f'].matchstr.focus()" doc_section = "useradmin.html#user-account-search" %] @@ -35,7 +34,7 @@ <option value="userid">user id</option> </select> <label for="matchstr">matching</label> -<input size="32" name="matchstr" id="matchstr"> +<input size="32" name="matchstr" id="matchstr" autofocus> <select name="matchtype"> <option value="substr" selected="selected">case-insensitive substring</option> <option value="regexp">case-insensitive regexp</option> diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index 78c5f0f28..8cdc767e4 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -22,7 +22,8 @@ <td> [% IF editusers %] <input size="64" maxlength="255" id="login" name="login" - value="[% otheruser.login FILTER html %]"> + value="[% otheruser.login FILTER html %]" + [%- " autofocus" UNLESS editform %]> [% IF editform %] [% IF !otheruser.in_group('bz_sudo_protect') %] <br> |