From d424b13ac41e83186760af172a4a18be2663abc3 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 12 Apr 2016 18:59:39 +0200 Subject: [PATCH] Fixes some styling, wording and validation --- .../src/less/pages/login.less | 11 +++-- .../views/common/dialogs/login.controller.js | 21 +++++++-- .../src/views/common/dialogs/login.html | 44 ++++++++++--------- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 4 +- .../umbraco/config/lang/en_us.xml | 4 +- 5 files changed, 52 insertions(+), 32 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/pages/login.less b/src/Umbraco.Web.UI.Client/src/less/pages/login.less index ff7fbc243a..6805783a86 100644 --- a/src/Umbraco.Web.UI.Client/src/less/pages/login.less +++ b/src/Umbraco.Web.UI.Client/src/less/pages/login.less @@ -75,10 +75,7 @@ } .login-overlay .switch-view { - margin-top: 10px; - a { - color: #fff; - } + margin-top: 10px; } @media (max-width: 565px) { @@ -115,3 +112,9 @@ margin: auto; color: @grayLight; } + +.login-overlay .text-error, +.login-overlay .text-info +{ + font-weight:bold; +} diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js index d76d66a7c4..71dbb8902f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.controller.js @@ -7,29 +7,44 @@ }); } + function resetInputValidation() { + if ($scope.loginForm) { + $scope.loginForm.username.$setValidity('auth', true); + $scope.loginForm.password.$setValidity('auth', true); + } + if ($scope.requestPasswordResetForm) { + $scope.requestPasswordResetForm.email.$setValidity("auth", true); + } + if ($scope.setPasswordForm) { + $scope.setPasswordForm.password.$setValidity('auth', true); + $scope.setPasswordForm.confirmPassword.$setValidity('auth', true); + } + } + $scope.allowPasswordReset = Umbraco.Sys.ServerVariables.umbracoSettings.allowPasswordReset; $scope.showLogin = function () { $scope.errorMsg = ""; + resetInputValidation(); $scope.view = "login"; setFieldFocus("loginForm", "username"); } $scope.showRequestPasswordReset = function () { $scope.errorMsg = ""; + resetInputValidation(); $scope.view = "request-password-reset"; $scope.showEmailResetConfirmation = false; setFieldFocus("requestPasswordResetForm", "email"); } $scope.showSetPassword = function () { + $scope.errorMsg = ""; + resetInputValidation(); $scope.view = "set-password"; setFieldFocus("setPasswordForm", "password"); } - - - var d = new Date(); var konamiGreetings = new Array("Suze Sunday", "Malibu Monday", "Tequila Tuesday", "Whiskey Wednesday", "Negroni Day", "Fernet Friday", "Sancerre Saturday"); var konamiMode = $cookies.konamiLogin; diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html index 992b98942e..76b90a8250 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/login.html @@ -1,5 +1,5 @@ 
-
+

{{greeting}}

@@ -12,7 +12,7 @@
-
+
{{error}}
@@ -46,15 +46,15 @@
+ +
+
{{errorMsg}}
+
-
-
{{errorMsg}}
-
-
@@ -68,21 +68,21 @@
- - - +
-
{{errorMsg}}
+
{{errorMsg}}
- +
-
+
If your email address has been matched an email with password reset instructions has been sent.
+ +
@@ -101,17 +101,19 @@
- - - +
-
{{errorMsg}}
+
{{errorMsg}}
-

- Your new password has been set and you may now use it to log in. +

+

+ Your new password has been set and you may now use it to log in. +

+ + @@ -119,7 +121,7 @@
-
+
The link you have clicked on is invalid or has expired.
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 95f68b1219..cc75ea0038 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -663,8 +663,8 @@ To manage your website, simply open the Umbraco back office and start adding con Session timed out © 2001 - %0%
Umbraco.com

]]>
Forgotten password? - Please enter your email address. If your account is located an email will be sent to you containing a link from which you can reset your password. - If your email address has been matched an email with password reset instructions has been sent. + An email will be sent to the address specified with a link to reset your password + An email with password reset instructions will be sent to the specified address if it matched our records Return to login form Please provide a new password. Your new password has been set and you may now use it to log in. diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 24380a5680..23c627830c 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -661,8 +661,8 @@ To manage your website, simply open the Umbraco back office and start adding con Session timed out © 2001 - %0%
Umbraco.com

]]>
Forgotten password? - Please enter your email address. If your account is located an email will be sent to you containing a link from which you can reset your password. - If your email address has been matched an email with password reset instructions has been sent. + An email will be sent to the address specified with a link to reset your password + An email with password reset instructions will be sent to the specified address if it matched our records Return to login form Please provide a new password. Your new password has been set and you may now use it to log in.