gitlab-org--gitlab-foss/app/views/profiles/passwords/edit.html.haml

34 lines
1.3 KiB
Plaintext
Raw Normal View History

2013-10-09 13:17:40 +00:00
%h3.page-title Password
%p.light
Change your password or recover your current one.
%hr
.update-password
= form_for @user, url: profile_password_path, method: :put, html: { class: 'form-horizontal' } do |f|
2013-10-09 13:17:40 +00:00
%div
%p.slead
You must provide current password in order to change it.
%br
After a successful password update you will be redirected to login page where you should login with your new password
-if @user.errors.any?
.alert.alert-danger
2013-10-09 13:17:40 +00:00
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.form-group
= f.label :current_password, class: 'control-label'
.col-sm-10
= f.password_field :current_password, required: true, class: 'form-control'
2013-10-09 13:17:40 +00:00
%div
= link_to "Forgot your password?", reset_profile_password_path, method: :put
.form-group
= f.label :password, 'New password', class: 'control-label'
.col-sm-10
= f.password_field :password, required: true, class: 'form-control'
.form-group
= f.label :password_confirmation, class: 'control-label'
.col-sm-10
= f.password_field :password_confirmation, required: true, class: 'form-control'
2013-10-09 13:17:40 +00:00
.form-actions
= f.submit 'Save password', class: "btn btn-save"