{% import "@A2lixTranslationForm/macros_bootstrap_3.html.twig" as a2lixTranslations %}
{% spaceless %}
    {% 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 %}
{% endspaceless %}
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
               Texte
            </div>
            <div class="panel-body">
                {{ a2lixTranslations.partialTranslations(form.translations, ['favoriteCatName']) }}
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Layout de la boutique
            </div>
            <div class="panel-body">
                {{ form_row(form.viewOrderByCategory) }}
                <div class="row">
                    <div class="col-md-6">  {{ form_row(form.viewCategory) }}</div><div class="col-md-6">{{ form_row(form.viewFavoriteCat) }}</div>
                </div>
                <div class="row">
                    {{ form_row(form.otherDeliveryMethodColor) }}
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Configuration de la boutique
            </div>
            <div class="panel-body">
                {{ form_row(form.hidePriceDefault) }}
                {{ form_row(form.enableAwardShop) }}
                {{ form_row(form.disableLogoBank) }}
                {{ form_row(form.enabledCityField) }}
                {{ form_row(form.maxAwardsVisibleInShop) }}

            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Activer seulement la boutique pour :
            </div>
            <div class="panel-body">
                {{ form_row(form.enableCountriesForShop) }}

            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Désactiver seulement la boutique pour :
            </div>
            <div class="panel-body">
                {{ form_row(form.disableCountries) }}
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Multiples de commande autorisées
            </div>
            <div class="panel-body">
                {{ form_row(form.multiples) }}
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Boutique en vacances
            </div>
            <div class="panel-body">
                {{ form_row(form.vacationOf) }}
                {{ form_row(form.vacationAt) }}
                {{ form_row(form.disableShopForVacation) }}
                {{ a2lixTranslations.partialTranslations(form.translations, ['vacation']) }}
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                Carte cadeau
            </div>
            <div class="panel-body">
                {{ form_row(form.giftCardCheckToken) }}
                {{ form_row(form.giftCardValidTime) }}
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="panel panel-info">
            <div class="panel-heading">
               Change calcul de la dégréssivité
            </div>
            <div class="panel-body">
                {{ form_row(form.degrissivityByItem) }}
            </div>
        </div>
    </div>
</div>
{{ form_rest(form) }}
