{% extends "pretixpresale/event/base.html" %}
{% load i18n %}
{% load eventurl %}
{% load static %}
{% load compress %}
{% block title %}{% trans "Pay order" %}{% endblock %}
{% block custom_header %}
    {{ block.super }}
    <script src="{{ checkouturl }}"></script>
    {% compress js file netseasy %}
        <script type="text/javascript" src="{% static "pretix_nets_easy/pretix_nets_easy.js" %}"></script>
    {% endcompress %}
    <script type="text/plain" id="nets_easy_pid">{{ pid }}</script>
    <script type="text/plain" id="nets_easy_checkout_key">{{ checkout_key }}</script>
{% endblock %}
{% block content %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">
                {% blocktrans trimmed with code=order.code %}
                    Pay order: {{ code }}
                {% endblocktrans %}
            </h3>
        </div>
        <div class="panel-body">
            <div id="paymentcontainer">
                <form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
                    {% csrf_token %}
                    <noscript>
                        <div class="alert alert-warning">
                            {% trans "Please turn on JavaScript." %}
                        </div>
                    </noscript>
                    <p>{% trans "Please use the button/form below to complete your payment." %}</p>
                    {% if request.event.testmode %}
                        <div class="alert alert-info">
                            <p>{{ payment.payment_provider.test_mode_message }}</p>
                        </div>
                    {% endif %}
                </form>
            </div>
        </div>
    </div>
    <div class="row checkout-button-row">
        <div class="col-md-4">
            <a class="btn btn-block btn-default btn-lg"
               href="{% eventurl request.event "presale:event.order" secret=order.secret order=order.code %}">
                {% trans "Cancel" %}
            </a>
        </div>
        <div class="clearfix"></div>
    </div>
{% endblock %}
