<form
    class="row align-items-center"
    x-data="{
        ticket: new ModelObjectGlue('ticket'),
        async init () {
            await this.ticket.get()
        }
    }"
    method="post"
    action="{{ form_action_url }}"
>
    {% csrf_token %}

    <div class="col-12 col-sm mb-3 mb-sm-0">
        {% include 'django_glue/form/field/select_field.html' with glue_model_field='ticket.purpose' %}
    </div>
    <div class="col-12 col-sm mb-3 mb-sm-0">
        {% include 'django_glue/form/field/select_field.html' with glue_model_field='ticket.priority' %}
    </div>
    {% if ticket.pk is not None %}
        <div class="col-12 col-sm mb-3 mb-sm-0">
            {% include 'django_glue/form/field/select_field.html' with glue_model_field='ticket.status' %}
        </div>
    {% endif %}
    <div class="col-12 mb-1 mt-3">
        {% include 'django_glue/form/field/text_field.html' with glue_model_field='ticket.description' %}
    </div>
    <div class="my-2">
        {% include 'django_spire/contrib/form/button/form_submit_button.html' %}
    </div>
</form>
