education/classroom

View on GitHub
app/views/shared/_invitation.html.erb

Summary

Maintainability
Test Coverage
<dt class=<%= mobile? ? "mobile-invitation-content" : "desktop-invitation-content" %>>
  <%= check_box_tag 'invitations_enabled',true, (@assignment.nil? ? @group_assignment.invitations_enabled : @assignment.invitations_enabled),
    onchange: "$(this).data('params', 'invitations_enabled=' + this.checked);showLoadingIndicator(true);showCheckmark(false);",
    data: {
      remote: true,
      url: url_for(action: :toggle_invitations, id: (@assignment.nil? ? @group_assignment.slug : @assignment.slug)),
      method: "POST"
    } %>
  <label class="pl-1">Enable assignment invitation URL <span class="tooltipped tooltipped-no-delay tooltipped-n tooltipped-multiline d-inline-block pl-1" style="bottom: 3px" aria-label="While enabled, students will be able to accept and access this assignment. When you no longer want anyone to access this assignment, uncheck to deactivate the invitation link."><%= octicon 'info' %></span></label>
  <span class="text-green"><%= octicon 'check', height: 16, id: "checkmark", style: "display: none; padding-bottom: 3px;" %></span>
  <%= image_tag 'octocat-spinner-128.gif', width: 13, height: 13, class: 'spinner', id: "loading-indicator", style: "display:none" %>
  <div class="input-group input-block pt-2">
    <%= render partial: "shared/invitations/clipboard_form", locals: local_assigns %>
  </div>
  <p class="note pt-1 mb-4">
    <%= t('views.shared.share_invite_url') %>
  </p>
</dt>