From d6f47aa5f07a11a8771ce95f156b5394e67285a8 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 8 Oct 2015 08:28:46 -0400 Subject: Bug 1200765 - Make login UX mobile friendly to assist mobile authentication workflow --- template/en/default/account/auth/login.html.tmpl | 95 ++++++++++++------------ template/en/default/global/header.html.tmpl | 8 ++ template/en/default/mfa/totp/verify.html.tmpl | 24 +++--- 3 files changed, 67 insertions(+), 60 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 922a55bd4..33aeaeaea 100644 --- a/template/en/default/account/auth/login.html.tmpl +++ b/template/en/default/account/auth/login.html.tmpl @@ -30,8 +30,9 @@ [% PROCESS global/variables.none.tmpl %] [% PROCESS global/header.html.tmpl - title = "Log in to $terms.Bugzilla", - onload = "document.forms['login'].Bugzilla_login.focus()" + title = "Log in to $terms.Bugzilla", + onload = "document.forms['login'].Bugzilla_login.focus()" + allow_mobile = 1 %] [% USE Bugzilla %] @@ -40,59 +41,55 @@ I need an email address and password to continue.

-
- - - - - - - - - + - - - + Param('rememberlogin') == 'defaultoff' %] +
+ + +
[% END %] - - - - -
- - [% Param('emailsuffix') FILTER html %] -
- -
  - - -
  - - -
+ [% PROCESS "global/hidden-fields.html.tmpl" + exclude="^Bugzilla_(login|password|restrictlogin)$" %] - [% PROCESS "global/hidden-fields.html.tmpl" - exclude="^Bugzilla_(login|password|restrictlogin)$" %] +
+ + +
- - +
+ + +
-

- (Note: you should make sure cookies are enabled for this site. - Otherwise, you will be required to log in frequently.) -

-
+ + + [% Hook.process('additional_methods') %] @@ -117,7 +114,7 @@ If you have an account, but have forgotten your password, enter your email address below and submit a request to change your password.
- + diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 3f70b9453..23634ed43 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -37,6 +37,7 @@ # atomlink: Atom link URL, May contain HTML # generate_api_token: generate a token which can be used to make authenticated webservice calls # no_body: if true the body element will not be generated + # allow_mobile: allow special CSS and viewport for detected mobile useragents #%] [% IF message %] @@ -103,6 +104,10 @@ [%# Add our required jQuery plugins %] [% jquery.push("cookie", "devbridgeAutocomplete") %] +[% IF allow_mobile && is_mobile_browser %] + [% style_urls.push("skins/standard/mobile.css") %] +[% END %] + [%# We should be able to set the default value of the header variable # to the value of the title variable using the DEFAULT directive, # but that doesn't work if a caller sets header to the empty string @@ -260,6 +265,9 @@ [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %] + [% IF allow_mobile && is_mobile_browser %] + + [% END %] [% Hook.process("additional_header") %] diff --git a/template/en/default/mfa/totp/verify.html.tmpl b/template/en/default/mfa/totp/verify.html.tmpl index ad75dc6bc..7314d909a 100644 --- a/template/en/default/mfa/totp/verify.html.tmpl +++ b/template/en/default/mfa/totp/verify.html.tmpl @@ -8,6 +8,7 @@ [% INCLUDE global/header.html.tmpl title = "Account Verification" + allow_mobile = 1 %]

Account Verification

@@ -16,16 +17,17 @@ [% reason FILTER html %] requires verification.
Please enter your verification code from your TOTP application:

- -
- [% FOREACH field IN postback.fields.keys %] - - [% END %] -
-
- -
+
+
+ [% FOREACH field IN postback.fields.keys %] + + [% END %] +
+
+ +
+
[% INCLUDE global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b