18F/identity-idp

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

Summary

Maintainability
Test Coverage
<% self.title = t('titles.passwords.change') %>

<%= render PageHeadingComponent.new.with_content(t('headings.passwords.change')) %>

<p id="password-description">
  <%= t('instructions.password.password_key') %>
</p>

<%= simple_form_for(@reset_password_form, url: user_password_path, method: :put) do |f| %>
  <%= f.input :reset_password_token, as: :hidden %>
  <%= f.full_error :reset_password_token %>
  <%= render PasswordConfirmationComponent.new(
        form: f,
        password_label: t('forms.passwords.edit.labels.password'),
        forbidden_passwords: @forbidden_passwords,
        field_options: {
          input_html: {
            aria: { describedby: 'password-description' },
          },
        },
      ) %>
  <%= f.submit t('forms.passwords.edit.buttons.submit'), class: 'display-block margin-y-5' %>
<% end %>

<%= render 'shared/password_accordion' %>