
    {% if not form.vars.valid %}
        <div class="alert alert-danger alert-dismissible" role="alert">
            <h5>Les erreurs a corriger !</h5>
            {% if not form.vars.valid %}
                <ul class="list-error">
                    {% for error in form.vars.errors %}
                        <span class="title-error">{{ (error.origin.config.name)|trans([]) }}</span>
                        <li>{{ error.message }}</li>
                    {% endfor %}
                </ul>
            {% endif %}
            {% for children in form.children %}
                {% if not children.vars.valid %}
                    <span class="title-error"> {{ (children.vars.name)|trans([]) }}</span>
                    <ul>
                        {% for error in children.vars.errors.form.getErrors(true) %}
                            <li>{{ error.message }}</li>
                        {% endfor %}
                    </ul>
                {% endif %}
            {% endfor %}
        </div>
    {% endif %}


<div class="row">
    <div class="col-md-6">
        <div class="panel panel-info">
            <div class="panel-heading">
                Code & Limite
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.title) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.minEquivalency) }}</div>
                    <div class="col-md-6">{{ form_row(form.maxEquivalency) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-6"> {{ form_row(form.maxCount) }}</div>
                    <div class="col-md-6"> {{ form_row(form.maxCountByCustomer) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-6"> {{ form_row(form.auto) }}</div>
                    <div class="col-md-6"> {{ form_row(form.disabled) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.cumulative) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.minSubtotalTTC) }}</div>
                    <div class="col-md-6">{{ form_row(form.maxSubtotalTTC) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-12">{{ form_row(form.incompatibleAutoPromos) }}</div>
                </div>
                <div class="row">
                    <div class="col-md-12">{{ form_row(form.assignedUser) }}</div>
                    <div class="col-md-12">{{ form_row(form.notificationEmail) }}</div>
                </div>
            </div>
        </div>
        <div class="panel panel-info">
            <div class="panel-heading">
                Offrir un produit
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12"> {{ form_row(form.offeredVariant) }}</div>
                </div>
            </div>
        </div>
        <div class="panel panel-info">
            <div class="panel-heading">
                Remise sur le montant du panier (et des frais de port si coché)
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.percent) }}</div>
                    <div class="col-md-6">{{ form_row(form.includeShippingFees) }}</div>
                </div>
            </div>
        </div>
        <div class="panel panel-info">
            <div class="panel-heading">
                Remise sur le montant du transport
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.percentShippingCost) }}</div>
                </div>
            </div>
        </div>
        <div class="panel panel-info">
            <div class="panel-heading">
                Remise en euros
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6">{{ form_row(form.amount) }}</div>
                    <div class="col-md-12"> {{ form_row(form.multipleByQuantity) }}</div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="panel panel-info">
            <div class="panel-heading">
                Date de début et date de fin
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-6"> {{ form_row(form.beginAt) }}</div>
                    <div class="col-md-6">  {{ form_row(form.endAt) }}</div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="panel panel-info">
            <div class="panel-heading">
                Code avantage valide pour les groupes :
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12"> {{ form_row(form.groups) }}</div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="panel panel-info">
            <div class="panel-heading">
                {{ 'admin.promo.products_zones_countries'|trans }}
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12"> {{ form_row(form.products) }}</div>
                    <div class="col-md-12"> {{ form_row(form.zones) }}</div>
                    <div class="col-md-12"> {{ form_row(form.restrictedCountryCodes) }}</div>
                </div>
            </div>
        </div>
    </div>
</div>
{{ form_rest(form) }}
