{% extends 'portal/base.html' %}

{% block subNav %}
    {% include "portal/partials/teacher_non_dashboard_subnav.html" %}
{% endblock subNav %}

{% block content %}
<div id="move_students_page"></div>

<section class="background container">
    <h4>Move students from class {{ old_class.name }} ({{ old_class.access_code }})</h4>
</section>

<div class="background container">
    <p><a href="{% url 'view_class' old_class.access_code %}" class="button--menu button--menu--enabled">&lt; Back to Edit class</a></p>
    <p>Choose a class from the drop down menu below to move the student.</p>
    <h4>Select destination class</h4>
    <form method="post" action="{% url 'teacher_move_students_to_class' old_class.access_code %}">

        {% csrf_token %}
        {{ form.non_field_errors }}
        {% for field in form %}
        <label for="id_{{ field.html_name }}">{{ field.label }}</label>
        <div class="row form--row">
            <div class="d-flex flex-col col-sm-6 col-md-6">
                {{ field }}
                {{ field.errors }}
                {% endfor %}
            </div>
        </div>
        <small>Choose class</small>
        <input type="hidden" name="transfer_students" value="{{ transfer_students }}"/>
        <div class="background button-group">
            <a id="cancel_button" class="button button--secondary button--secondary--dark" href="{% url 'view_class' old_class.access_code %}">Cancel</a>
            <button id="move_button" type="submit" class="button button--primary">Continue</button>
        </div>
    </form>
</div>

{% endblock %}
