18F/hhs-acf-uc-dashboard

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

Summary

Maintainability
Test Coverage
<div class='devise-form'>
  <h2>Edit <%= resource_name.to_s.humanize %></h2>

  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
    <%= devise_error_messages! %>

    <div class="field">
      <%= f.label :email %>
      <%= f.email_field :email, autofocus: true %>
    </div>

    <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
      <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
    <% end %>

    <div class="field">
      <%= f.label :password %> <i>(leave blank if you don't want to change it)</i>
      <%= f.password_field :password, autocomplete: "off" %>
      <% if @minimum_password_length %>
        <em><%= @minimum_password_length %> characters minimum</em>
      <% end %>
    </div>

    <div class="field">
      <%= f.label :password_confirmation %>
      <%= f.password_field :password_confirmation, autocomplete: "off" %>
    </div>

    <div class="field">
      <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i>
      <%= f.password_field :current_password, autocomplete: "off" %>
    </div>

    <div class="actions">
      <%= f.submit "Update" %>
    </div>
  <% end %>
</div>