{% extends '@CoreShopFrontend/Checkout/layout.html.twig' %}

{% form_theme form 'bootstrap_4_layout.html.twig' %}

{% block checkout_title %}
    {{ 'coreshop.ui.summary'|trans }}
{% endblock %}

{% block checkout %}
    {{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }}
        {{ form_errors(form) }}

        {% if cart.hasItems %}
            <div class="cart-summary">
                {% include '@CoreShopFrontend/Checkout/steps/summary/_list.html.twig' %}
            </div>
        {% endif %}

        {{ form_row(form.acceptTerms, coreshop_test_form_attribute('accept-terms')) }}

        <div class="row">
            {% if is_granted('CORESHOP_QUOTE_CREATE') %}
                <div class="col-12 col-sm-1 offset-sm-10">
                    {{ form_widget(form.submitQuote, coreshop_test_form_attribute('submit-quote')|coreshop_merge_recursive({attr: {class: 'btn btn-success w-100'}})) }}
                </div>
            {% endif %}

            {% if is_granted('CORESHOP_ORDER_CREATE') %}
                <div class="col-12 col-sm-1">
                    {{ form_widget(form.submitOrder, coreshop_test_form_attribute('submit-order')|coreshop_merge_recursive({attr: {class: 'btn btn-success w-100'}})) }}
                </div>
            {% endif %}
        </div>

    {{ form_end(form) }}

{% endblock %}
