libertarian-party/partynest

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

Summary

Maintainability
Test Coverage
<div class="container">
  <h1><%= translate '.change_your_password' %></h1>

  <%= simple_form_for resource,
                      as: resource_name,
                      url: password_path(resource_name),
                      html: { method: :put } do |f| %>
    <%= f.error_notification %>

    <%= f.input :reset_password_token, as: :hidden %>
    <%= f.full_error :reset_password_token %>

    <%= f.input :password,
                label: translate('.new_password'),
                required: true,
                autofocus: true,
                hint: (translate('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
                input_html: { autocomplete: 'new-password' } %>

    <%= f.input :password_confirmation,
                label: translate('.confirm_new_password'),
                required: true %>

    <%= f.button :submit, translate('.change_my_password') %>
  <% end %>

  <%= render 'users/shared/links' %>
</div>