{% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
{% import '@LcShop/backend/order/macros.html.twig' as orderMacros %}
{% trans_default_domain 'lcshop' %}


<div class="col-12">

    {% if form_order_products is defined %}
        {{ form_start(form_order_products, {'attr': {'id' : 'orderProductsForm'}}) }}
        <script>
            window.templateTest = '{{ orderMacros.productsTemplate(form_order_products)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}';
        </script>
    {% else %}
        <script>
            window.templateTest = '{{ orderMacros.productsTemplate(null)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}';
        </script>
        <form id="orderProductsAction">
    {% endif %}


        {{ orderMacros.tableHead() }}

        {{ orderMacros.products() }}

        {{ orderMacros.tableTotal() }}

    {% if form_order_products is defined %}
        {% do form_order_products.orderProducts.setRendered %}
        {{ form_end(form_order_products) }}
    {% else %}
        </form>
    {% endif %}

    <div class="clearfix"></div>
    <script>
        window.orderObject = {{ order|json_encode|raw }};
    </script>
</div>


