From 35f81aa500d8fb3d71eec2af97c32400d94fcd05 Mon Sep 17 00:00:00 2001 From: Maxime Roux Date: Mon, 20 Apr 2015 16:49:15 -0700 Subject: [PATCH] UI-243: Added a control to display the password strength on a password input. --- submodules/users/users.js | 4 ++++ views/users-changePassword.html | 3 +-- views/users-creation.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/submodules/users/users.js b/submodules/users/users.js index da026a74..f01b872d 100644 --- a/submodules/users/users.js +++ b/submodules/users/users.js @@ -524,6 +524,8 @@ define(function(require){ } }); + monster.ui.showPasswordStrength(userTemplate.find('#password')); + userTemplate.find('#create_user').on('click', function() { if(monster.ui.valid(userTemplate.find('#form_user_creation'))) { var dataForm = monster.ui.getFormData('form_user_creation'), @@ -775,6 +777,8 @@ define(function(require){ var passwordTemplate = $(monster.template(self, 'users-changePassword', currentUser)), form = passwordTemplate.find('#form_new_username'); + monster.ui.showPasswordStrength(passwordTemplate.find('#inputPassword')); + passwordTemplate.find('.save-new-username').on('click', function() { var formData = monster.ui.getFormData('form_new_username'), userToSave = $.extend(true, {}, currentUser, formData); diff --git a/views/users-changePassword.html b/views/users-changePassword.html index edf1c407..c7b42416 100644 --- a/views/users-changePassword.html +++ b/views/users-changePassword.html @@ -10,11 +10,10 @@
- +
- {{#monsterText}} {{i18n.users.dialogChangePassword.help}} {{/monsterText}} diff --git a/views/users-creation.html b/views/users-creation.html index 6b8a4e1a..6790c506 100644 --- a/views/users-creation.html +++ b/views/users-creation.html @@ -19,7 +19,7 @@
- +