From e02e3bc792293af9460da9c9d6b9185b94c5307f Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 20 Jan 2014 23:15:06 +0100 Subject: Bug 958825: Use HTML5's attribute "autofocus" instead of onload="element.focus()" r/a=justdave --- template/en/default/account/auth/login.html.tmpl | 5 ++--- template/en/default/account/create.html.tmpl | 10 +++------- .../en/default/account/email/confirm-new.html.tmpl | 4 ++-- .../en/default/admin/milestones/create.html.tmpl | 6 ++---- template/en/default/admin/users/create.html.tmpl | 1 - template/en/default/admin/users/search.html.tmpl | 3 +-- template/en/default/admin/users/userdata.html.tmpl | 3 ++- template/en/default/attachment/choose.html.tmpl | 11 +++++------ .../en/default/bug/create/create-guided.html.tmpl | 13 +++++-------- template/en/default/bug/summarize-time.html.tmpl | 3 +-- template/en/default/global/textarea.html.tmpl | 2 +- template/en/default/pages/quicksearch.html.tmpl | 10 +++------- .../en/default/search/search-specific.html.tmpl | 22 ++++------------------ 13 files changed, 31 insertions(+), 62 deletions(-) (limited to 'template') diff --git a/template/en/default/account/auth/login.html.tmpl b/template/en/default/account/auth/login.html.tmpl index 2d6a71f2d..27c0690af 100644 --- a/template/en/default/account/auth/login.html.tmpl +++ b/template/en/default/account/auth/login.html.tmpl @@ -15,8 +15,7 @@ [% END %] [% PROCESS global/header.html.tmpl - title = "Log in to $terms.Bugzilla", - onload = "document.forms['login'].Bugzilla_login.focus()" + title = "Log in to $terms.Bugzilla" %] [% USE Bugzilla %] @@ -40,7 +39,7 @@ + [%- ' type="email"' UNLESS Param('emailsuffix') %] autofocus> [% Param('emailsuffix') FILTER html %] diff --git a/template/en/default/account/create.html.tmpl b/template/en/default/account/create.html.tmpl index 21d9251b5..1b5a4daa8 100644 --- a/template/en/default/account/create.html.tmpl +++ b/template/en/default/account/create.html.tmpl @@ -13,13 +13,9 @@ # Param("emailsuffix") is used to pre-fill the email field. #%] -[% title = BLOCK %] - Create a new [% terms.Bugzilla %] account -[% END %] - [% PROCESS global/header.html.tmpl - title = title - onload = "document.forms['account_creation_form'].login.focus();" %] + title = "Create a new $terms.Bugzilla account" +%]

To create a [% terms.Bugzilla %] account, all you need to do is to enter @@ -75,7 +71,7 @@ Email address: [% END %] - [% Param('emailsuffix') FILTER html %] diff --git a/template/en/default/account/email/confirm-new.html.tmpl b/template/en/default/account/email/confirm-new.html.tmpl index 45ef5c81c..ec8d5a474 100644 --- a/template/en/default/account/email/confirm-new.html.tmpl +++ b/template/en/default/account/email/confirm-new.html.tmpl @@ -15,7 +15,7 @@ [% title = BLOCK %]Create a new user account for '[% email FILTER html %]'[% END %] [% PROCESS "global/header.html.tmpl" title = title - onload = "document.forms['confirm_account_form'].realname.focus();" %] +%]

To create your account, you must enter a password in the form below. @@ -33,7 +33,7 @@ (OPTIONAL) : - + : 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()" %]

@@ -26,12 +25,11 @@ + autofocus> - + 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 @@ - + + value="[% otheruser.login FILTER html %]" + [%- " autofocus" UNLESS editform %]> [% IF editform %] [% IF !otheruser.in_group('bz_sudo_protect') %]
diff --git a/template/en/default/attachment/choose.html.tmpl b/template/en/default/attachment/choose.html.tmpl index 9a82d7c86..f20facd90 100644 --- a/template/en/default/attachment/choose.html.tmpl +++ b/template/en/default/attachment/choose.html.tmpl @@ -7,13 +7,12 @@ #%] [% PROCESS global/header.html.tmpl - title = "Locate or Create Attachment", - onload = "document.forms['choose-id'].id.focus()" - %] + title = "Locate or Create Attachment" +%]

Access an attachment by entering its ID into the form below:

-

Attachment ID: +

Attachment ID:

@@ -21,14 +20,14 @@

Or, Access it from the list of attachments in its associated [% terms.bug %] report:

-

[% terms.Bug %] ID: +

[% terms.Bug %] ID:

Or, Create a new attachment by entering its [% terms.bug %] Id below:

-

[% terms.Bug %] ID: +

[% terms.Bug %] ID:

diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 64bacf0b1..7f9e5179f 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -223,9 +223,10 @@ function PutDescription() { Details [% INCLUDE global/textarea.html.tmpl - name = 'comment' - minrows = 6 - cols = constants.COMMENT_COLS + name = 'comment' + minrows = 6 + cols = constants.COMMENT_COLS + mandatory = 1 %]

Expand on the Summary. Please be @@ -379,11 +380,7 @@ function PutDescription() {

Step 3 of 3 - submit the [% terms.bug %] report

- +

diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl index 3865c02a2..c3c233494 100644 --- a/template/en/default/bug/summarize-time.html.tmpl +++ b/template/en/default/bug/summarize-time.html.tmpl @@ -261,7 +261,7 @@ : -