= devise_error_messages!
.container
  %h3 Change your password
  = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, role: "form" }) do |f|
    = f.hidden_field :reset_password_token
    %fieldset.form-group
      = f.label :password, t('.new_password', :default => 'New password')
      = f.password_field :password, autofocus: true, class: "form-control"
    %fieldset.form-group
      = f.label :password_confirmation, t('.confirm_new_password', :default => 'Confirm new password')
      = f.password_field :password_confirmation, class: "form-control"
    = f.submit 'Change my password', class: "btn btn-primary"
= render "devise/shared/links"

= devise_error_messages!
.container
  %h3 Change your password
  = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, role: "form" }) do |f|
    = f.hidden_field :reset_password_token
    %fieldset.form-group
      = f.label :password, t('.new_password', :default => 'New password')
      = f.password_field :password, autofocus: true, class: "form-control"
    %fieldset.form-group
      = f.label :password_confirmation, t('.confirm_new_password', :default => 'Confirm new password')
      = f.password_field :password_confirmation, class: "form-control"
    = f.submit 'Change my password', class: "btn btn-primary"
  = render "devise/shared/links"

Fix shared links for edit password
Fix shared links for edit password