{% load crispy_forms_tags %}
<form method="post" action="{% url 'generic:exam_collection_bulk_add_groups' collection.pk %}" hx-post="{% url 'generic:exam_collection_bulk_add_groups' collection.pk %}" hx-target="#bulk-add-groups" hx-swap="innerHTML" class="bulk-add-groups-form">
    {% csrf_token %}

    {{ form|crispy }}

    <div class="mt-2">
        <button type="button" class="btn btn-primary btn-sm" hx-post="{% url 'generic:exam_collection_bulk_add_groups' collection.pk %}" hx-include="input[name='csrfmiddlewaretoken'], select[name='cid_user_groups'], select[name='user_user_groups'], select[name='exam_types']" hx-target="#bulk-add-groups" hx-swap="innerHTML">Add groups</button>
        <button type="button" class="btn btn-secondary btn-sm" hx-get="{% url 'generic:examcollection_detail' collection.pk %}" hx-target="#bulk-add-groups" hx-swap="innerHTML">Cancel</button>
    </div>
</form>
