2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Password"
|
2015-02-23 13:40:06 -05:00
|
|
|
%h3.page-title Password Settings
|
2013-10-09 09:17:40 -04:00
|
|
|
%p.light
|
2015-02-13 07:33:28 -05:00
|
|
|
- if @user.password_automatically_set?
|
|
|
|
Set your password.
|
|
|
|
- else
|
|
|
|
Change your password or recover your current one.
|
2013-10-09 09:17:40 -04:00
|
|
|
%hr
|
|
|
|
.update-password
|
2013-12-30 19:50:36 -05:00
|
|
|
= form_for @user, url: profile_password_path, method: :put, html: { class: 'form-horizontal' } do |f|
|
2013-10-09 09:17:40 -04:00
|
|
|
%div
|
|
|
|
%p.slead
|
2015-02-13 07:33:28 -05:00
|
|
|
- unless @user.password_automatically_set?
|
|
|
|
You must provide current password in order to change it.
|
|
|
|
%br
|
2015-02-23 13:40:06 -05:00
|
|
|
After a successful password update, you will be redirected to the login page where you can log in with your new password.
|
2013-10-09 09:17:40 -04:00
|
|
|
-if @user.errors.any?
|
2013-12-31 09:34:14 -05:00
|
|
|
.alert.alert-danger
|
2013-10-09 09:17:40 -04:00
|
|
|
%ul
|
|
|
|
- @user.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2015-02-13 07:33:28 -05:00
|
|
|
- unless @user.password_automatically_set?
|
|
|
|
.form-group
|
|
|
|
= f.label :current_password, class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= f.password_field :current_password, required: true, class: 'form-control'
|
|
|
|
%div
|
|
|
|
= link_to "Forgot your password?", reset_profile_password_path, method: :put
|
2013-10-09 09:17:40 -04:00
|
|
|
|
2014-10-24 18:19:35 -04:00
|
|
|
.form-group
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.label :password, 'New password', class: 'control-label'
|
2014-01-08 18:06:19 -05:00
|
|
|
.col-sm-10
|
2015-01-15 08:02:09 -05:00
|
|
|
= f.password_field :password, required: true, class: 'form-control'
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.label :password_confirmation, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2013-12-30 19:50:36 -05:00
|
|
|
= f.password_field :password_confirmation, required: true, class: 'form-control'
|
2013-10-09 09:17:40 -04:00
|
|
|
.form-actions
|
2015-02-23 18:48:00 -05:00
|
|
|
= f.submit 'Save password', class: "btn btn-create"
|