
{% extends 'base.html' %}

{% load i18n %}


{% block meta_title %}
    {{ order.printable_name }}
{% endblock %}


{% block breadcrumbs %}
{% endblock %}

{% block search %}
{% endblock %}


{% block content %}
    <div class="container" style="padding: 50px 0;">
        <div class="row">
            <div class="col-md-6">
                <div style="display: flex;gap: 10px;padding-bottom: 200px">
                    <div>
                        <i class="fa fa-check-circle" style="font-size: 60px;color: #3a945b"></i>
                    </div>
                    <div>
                        <b>{% trans 'Thank you for your order!' %}</b> <br />
                        {% trans 'Your order' %} <b>#{{ order.id }}</b> {% trans 'from' %} {{ order.created|date:'d E Y' }}
                        {% trans 'successfully accepted.' %}<br />
                        {% trans 'Our manager will get back to you in a work time.' %}<br />
                        {% trans 'Thank you for being with us.' %}
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                {% if order.is_paynow_form_visible and checkout_form %}
                    <form action="{{ checkout_form.action }}" method="{{ checkout_form.method }}" target="_blank">
                        {{ checkout_form }}
                        <button type="submit" class="btn btn-success btn-lg pull-left">
                            <i class="fa fa-credit-card"></i>
                            {% trans 'Pay the order' %} ({{ order.printable_total }})
                        </button>
                    </form>
                {% endif %}
            </div>
        </div>
    </div>
{% endblock %}


{% block js %}
    {{ block.super }}

    {{ serialized_products|json_script:"items-data" }}

    <script>
        (function ($) {
            $(window).trigger('checkout.purchase', [
                {
                    order_id: "{{ order.pk }}",
                    order_total: "{{ order.total }}",
                    products: JSON.parse(document.getElementById('items-data').textContent),
                }
            ]);
        })(jQuery);
    </script>
{% endblock %}
