porkchopclub/porkchop

View on GitHub
app/views/devise/passwords/edit.html.haml

Summary

Maintainability
Test Coverage
.page-header
  .page-header-inner
    %h1.page-header-title Change Your Password
    .page-header-links
      = render "devise/shared/links"

= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'porkchop-form' }) do |f|
  = f.error_notification
  = f.input :reset_password_token, as: :hidden
  = f.full_error :reset_password_token

  .form-field-group
    = f.input :password, label: "New password", required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length)
    = f.input :password_confirmation, label: "Confirm your new password", required: true

  .form-actions
    = f.button :submit, "Change my password"