{% load i18n %}
{% if form.errors %}
<!-- form errors  -->
<div class="oh-wrapper">
    <div class="oh-alert-container">
        {% for error in form.non_field_errors %}
        <div class="oh-alert oh-alert--animated oh-alert--danger">
            {{ error }}
        </div>
        {% endfor %}
    </div>
</div>
{% endif %}
<div class="p-3">
    <div style="border:1px solid hsl(213, 22%, 84%);">
        <form hx-post="{% url 'task-creation' %}?stage_id={{ stage_id }}">
            <div hidden>{{ form.stage_id }}</div>

            <div class="oh-modal__dialog-body pb-2">
                <label class="oh-label d-block">{% trans "Task Title" %}</label>
                {{ form.task_title }}
                {{ form.task_title.errors }}
            </div>

            <div class="oh-modal__dialog-body pb-2">
                <label class="oh-label d-block">{% trans "Task Managers" %}</label>
                {{ form.managers }}
                {{ form.managers.errors }}
            </div>

            <div class="oh-modal__dialog-body pb-2">
                <label class="oh-label d-block">{% trans "Candidates" %}</label>
                {{ form.candidates }}
                {{ form.candidates.errors }}
            </div>
            <div class="oh-modal__dialog-footer">
                <button type="submit" class="oh-btn oh-btn--secondary w-100">
                    {% trans "Apply" %}
                </button>
            </div>
        </form>
    </div>
</div>
