{% extends "base.html" %}
{% block content %}
  {#  {% for player in roster %}#}
  {#    <li class="list-group-item">#}
  {#      {{ player.fname }} {{ player.lname }}#}
  {#    </li>#}
  {#  {% endfor %}#}
  <form method="post" action='{% url 'gamechanger_import_roster' %}' >
  {{ formset.management_form }}
  {% csrf_token %}
  <table>
    <tr>
      <td>
        {{ formset.0.gamechanger_name.label }}
      </td>
      <td>
        {{ formset.0.teamsnap_name.label }}
      </td>
      <td>
        {{ formset.0.DELETE.label }}
      </td>
    </tr>
    {% for form in formset %}
      <tr>
        <td>
          {{ form.gamechanger_name.value }}
        </td>
        <td>
          {{ form.teamsnap_member_id }}
        </td>
        <td>
          {{ form.DELETE }}
        </td>
        {{ form.gamechanger_name.as_hidden }}
        {{ form.teamsnap_name.as_hidden }}
          {{ form.id.as_hidden }}
          {{ form.teamsnap_member_id.as_hidden }}
          {{ form.fname.as_hidden }}
          {{ form.lname.as_hidden }}
      </tr>
    {% endfor %}
  </table>
  <button class="btn btn-success" type="submit">
{#                <i class="bi bi-arrow-right"></i>#}
                Import
              </button>
  </form>
{% endblock %}
