From 0d598f6c6bfb625e2e3cd9bbb7d0cf03bea3363e Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 14 Apr 2026 13:51:00 -0500 Subject: [PATCH] Website: update new password form (#43548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: - Updated the new password form and change password form on the logged-in customer dashboard to have the same password requirements the register form - Updated the button styles on the 498 response page ## Summary by CodeRabbit * **New Features** * Strengthened password requirements: 12–48 characters, must include at least one number and one symbol. * More specific validation feedback for new/confirm password fields. * **Bug Fixes** * Modal focus behavior improved so password inputs receive focus when opened. * **Style** * Primary button styling applied to password actions. * Link hover visuals enhanced. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../assets/js/pages/customers/dashboard.page.js | 9 ++++++++- .../js/pages/entrance/new-password.page.js | 16 ++++++++++++++-- website/assets/styles/pages/498.less | 4 +++- website/views/498.ejs | 2 +- website/views/layouts/layout.ejs | 2 +- website/views/pages/customers/dashboard.ejs | 10 ++++++---- website/views/pages/entrance/new-password.ejs | 10 +++++++--- 7 files changed, 40 insertions(+), 13 deletions(-) diff --git a/website/assets/js/pages/customers/dashboard.page.js b/website/assets/js/pages/customers/dashboard.page.js index f209f46f2f..d957fc038a 100644 --- a/website/assets/js/pages/customers/dashboard.page.js +++ b/website/assets/js/pages/customers/dashboard.page.js @@ -62,7 +62,14 @@ parasails.registerPage('dashboard', { this.formData = {}; this.formRules = { oldPassword: {required: true}, - newPassword: {required: true, minLength: 8}, + newPassword: { + required: true, + minLength: 12, + maxLength: 48, + custom: (value)=>{ + return value.match(/^(?=.*\d)(?=.*[^A-Za-z0-9]).{12,48}$/); + } + }, }; this.modal = 'update-password'; }, diff --git a/website/assets/js/pages/entrance/new-password.page.js b/website/assets/js/pages/entrance/new-password.page.js index 0b934c8326..9d98eb90fe 100644 --- a/website/assets/js/pages/entrance/new-password.page.js +++ b/website/assets/js/pages/entrance/new-password.page.js @@ -15,8 +15,20 @@ parasails.registerPage('new-password', { // Form rules formRules: { - password: {required: true, minLength: 8}, - confirmPassword: {required: true, minLength: 8, sameAs: 'password'}, + password: { + required: true, + minLength: 12, + maxLength: 48, + custom: (value)=>{ + return value.match(/^(?=.*\d)(?=.*[^A-Za-z0-9]).{12,48}$/); + } + }, + confirmPassword: { + required: true, + minLength: 12, + maxLength: 48, + sameAs: 'password', + }, }, // Server error state for the form diff --git a/website/assets/styles/pages/498.less b/website/assets/styles/pages/498.less index 45b3803777..c96d8a04eb 100644 --- a/website/assets/styles/pages/498.less +++ b/website/assets/styles/pages/498.less @@ -1,5 +1,7 @@ [id='498'] { - //… + a.btn:hover { + color: #FFF; + } } diff --git a/website/views/498.ejs b/website/views/498.ejs index d84f0eba9a..3cdc8ddaf4 100644 --- a/website/views/498.ejs +++ b/website/views/498.ejs @@ -4,7 +4,7 @@

Need further help accessing your account?
 Please contact support or request a new password reset.

- Reset password + Reset password
diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs index ee209b02f6..0d04f3a8f2 100644 --- a/website/views/layouts/layout.ejs +++ b/website/views/layouts/layout.ejs @@ -929,8 +929,8 @@ - + diff --git a/website/views/pages/customers/dashboard.ejs b/website/views/pages/customers/dashboard.ejs index bd3cc81342..a1c10a5be7 100644 --- a/website/views/pages/customers/dashboard.ejs +++ b/website/views/pages/customers/dashboard.ejs @@ -181,21 +181,23 @@
- Save + Save
diff --git a/website/views/pages/entrance/new-password.ejs b/website/views/pages/entrance/new-password.ejs index a5894dfbc6..e543f4555b 100644 --- a/website/views/pages/entrance/new-password.ejs +++ b/website/views/pages/entrance/new-password.ejs @@ -9,16 +9,20 @@
Please enter a password.
Password too short.
-

Minimum length is 8 characters

+
Password too long.
+
Password does not meet requirements.
+

Passwords must be 12-48 characters, with at least 1 number (e.g. 0 - 9) and 1 symbol (e.g. &*#).

Password too short.
-
Your new password and confirmation do not match.
+
Password does not meet requirements.
+
Your new password and confirmation do not match.
+
- Submit + Submit