
{% embed "@LcShop/backend/default/block/embed_modal.twig" %}
    {% trans_default_domain 'lcshop' %}

    {% block id %}modal-new-ticket{% endblock %}
    {% block title %}{{ "action.ticket.writeToUser"|trans }}{% endblock %}

    {% block form_start %}
        {{ form_start(form, {'attr': { 'id' : 'newTicket', 'action': path('easyadmin', {'entity' : 'Ticket', 'action': 'new'})}}) }}
        {% form_theme form '@LcShop/backend/form/custom_modal_bootstrap_4.html.twig' %}
    {% endblock %}

    {% block content %}
        <div class="col">
            {{ form_row(form.user) }}
            {{ form_row(form.subject) }}

            {% if form.orderId.vars.value is not empty %}
                <p>
                    <strong>Ce ticket concernera la commande #{{ form.orderId.vars.value }}</strong><br />
                    <i>Si vous ne le souhaitez pas, écrivez à l'utilisateur depuis l'onglet utilisateur</i>
                </p>
            {% endif %}
            {{ form_rest(form) }}
        </div>
    {% endblock %}

    {% block footer %}
        {{ parent() }}
        <button type="button" class="btn btn-primary  btn-save" >{{ 'action.send'|trans }}</button>
        {#{{ form_rest(form) }}#}
    {% endblock %}

    {% block form_end %}
        {{ form_end(form) }}
    {% endblock %}

{% endembed %}
