crowdAI/crowdai

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

Summary

Maintainability
Test Coverage
<div class='content'>
  <%= render 'header' %>
  <div class="row">
    <%= form_for resource, as: resource_name, url: registration_path(resource_name), method: :put, html: { class: 'sgl-col' }, validate: true do |f| %>
      <%= render "shared/error_messages", target: resource %>
      <fieldset>
        <%= f.label :email %>
        <%= f.text_field :email %>
        <%= f.label :current_password, 'Current Password' %>
        <%= f.password_field :current_password, autocomplete: :off %>
        <%= f.label :password, 'New Password' %>
        <%= f.password_field :password, autocomplete: :off %>
        <%= f.label :password_confirmation, 'Confirm New Password' %>
        <%= f.password_field :password_confirmation, autocomplete: :off %>

        <div class="button-group">
          <%= f.button 'Save', type: 'submit', class: 'btn btn-primary' %>
          <%= link_to 'Cancel', edit_participant_registration_path, class: 'btn btn-secondary' %>
        </div>
      </fieldset>
    <% end %>
  </div>

  <div class="additional">
    <div class="row">
      <a data-remodal-target="modal">Delete my account</a>
    </div>
  </div>
</div>

<%= render partial: 'shared/delete_modal' %>