diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-30 14:32:11 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-30 14:32:11 +0300 |
commit | e1299bab7b1c275c145669a1a0eff2928511ecb4 (patch) | |
tree | 56c490e9ce39cdfe8ac4501201d34b8f3b2219f0 /app/views/devise | |
parent | fa96b0517fbed0a63ad1c8ddbf0e67d710c08c4a (diff) | |
parent | d9023da90d3d723bcb9ba372b0b89a8747aca6af (diff) |
Merge branch 'feature_password_strength_indicator' into 'master'
Add a password strength indicator to SIGN UP and PROFILE pages
Fixes #1647
Added a password strength indicator to the sign up page. You can see how it looks in the following screenshot. In the sign up page, it checks if the password contains the username and alerts the user about it. If the user still wants to proceed with creating his account, nothing will stop him. This is merely a message. The indicator changes the input background color based on the strength like this:
![new_full](https://dev.gitlab.org/uploads/gitlab/gitlabhq/0e6da27cfe/new_full.png)
The password strength indicator can also be found in the profile edit page. It functions in almost the exact same way, with the exception that it doesn't check if the password contains the username.
![edit_full](https://dev.gitlab.org/uploads/gitlab/gitlabhq/f73001539e/edit_full.png)
There are tests included.
/cc @job
See merge request !1227
Diffstat (limited to 'app/views/devise')
-rw-r--r-- | app/views/devise/passwords/edit.html.haml | 4 | ||||
-rw-r--r-- | app/views/devise/registrations/new.html.haml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml index 1326cc0aac9..f6cbf9b82ba 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.html.haml @@ -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 diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index d6a952f3dc5..123de881f59 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -11,8 +11,8 @@ = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true %div = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true - %div - = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true + .form-group#password-strength + = f.password_field :password, class: "form-control middle", id: "user_password_sign_up", placeholder: "Password", required: true %div = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true %div |