education/classroom

View on GitHub
app/views/group_assignments/_delete_group_assignment_modal.html.erb

Summary

Maintainability
Test Coverage
<div class="remodal text-left" data-remodal-id="delete-group-assignment">
  <button data-remodal-action="close" class="remodal-close"><%= octicon 'x' %></button>
  <h2 class="remodal-header text-left">Are you sure you want to delete this?</h2>

  <div class="remodal-description">
    <p>
      This action <strong>CANNOT</strong> be undone.
      This will permanently delete the <strong><%= @group_assignment.title %></strong> group assignment from GitHub Classroom.
      In addition this will also delete <strong><%= pluralize(@group_assignment.group_assignment_repos.count, 'participant repository') %></strong>
      under the <strong><%= @organization.github_organization.login %></strong> organization.
    </p>
  </div>

  <hr>

  <%= form_for [@organization, @group_assignment], html: { "data-name" => @group_assignment.title, method: 'delete' } do |f| %>
    <dl class="form js-normalize-submit">
      <dt>Please type the name of the group assignment to confirm</dt>
      <dd><input type="text" class="js-input-block form-control input-contrast input-block" autofocus autocomplete="off"></dd>
    </dl>

    <%= f.submit 'Delete this group assignment', class: 'btn btn-danger btn-block js-submit', disabled: true %>
  <% end %>
</div>