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.
This commit is contained in:
parent
3d705131f7
commit
91c96b3714
3 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue