Commit 91c96b37 authored by Patricio Cano's avatar Patricio Cano

Added a password strength indicator

to the reset password view and the change password view after first login.
Updated JS to work with the updated views.
parent 3d705131
......@@ -15,10 +15,10 @@ $(document).ready ->
profileOptions.rules =
activated: overwritten_rules
signUpOptions = {}
signUpOptions.common =
deviseOptions = {}
deviseOptions.common =
usernameField: "#user_username"
signUpOptions.ui =
deviseOptions.ui =
container: "#password-strength"
showPopover: true
showErrors: true
......@@ -26,8 +26,9 @@ $(document).ready ->
showProgressBar: false
showStatus: true
errorMessages: overwritten_messages
signUpOptions.rules =
deviseOptions.rules =
activated: overwritten_rules
$("#user_password").pwstrength profileOptions
$("#user_password_sign_up").pwstrength signUpOptions
$("#user_password_sign_up").pwstrength deviseOptions
$("#user_password_recover").pwstrength deviseOptions
......@@ -6,8 +6,8 @@
.devise-errors
= devise_error_messages!
= f.hidden_field :reset_password_token
%div
= f.password_field :password, class: "form-control top", placeholder: "New password", required: true
.form-group#password-strength
= f.password_field :password, class: "form-control top", id: "user_password_recover", placeholder: "New password", required: true
%div
= f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
.clearfix.append-bottom-10
......
......@@ -14,7 +14,7 @@
.form-group
= f.label :current_password, class: 'control-label'
.col-sm-10= f.password_field :current_password, required: true, class: 'form-control'
.form-group
.form-group#password-strength
= f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, required: true, class: 'form-control'
.form-group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment