{% extends "pretixpresale/event/base.html" %}
{% load i18n %}
{% load money %}
{% load eventurl %}
{% block title %}{% trans "Cancel order" %}{% endblock %}
{% block content %}
    <h2>
        {% blocktrans trimmed with code=order.code %}
            Cancel order: {{ code }}
        {% endblocktrans %}
    </h2>
    <p>
        {% blocktrans trimmed %}
            Do you really want to cancel this order? You cannot revert this action.
        {% endblocktrans %}
        {% trans "This will invalidate all of your tickets." %}
    </p>
    {% if refund_amount %}
        {% if can_auto_refund %}
            <p>
                <strong>
                    {% blocktrans trimmed with amount=refund_amount|money:request.event.currency %}
                        The refund amount of {{ amount }} will automatically be sent back to your original payment method. Depending on the payment method,
                        please allow for up to two weeks before this appears on your statement.
                    {% endblocktrans %}
                </strong>
            </p>
        {% else %}
            <div class="alert alert-warning">
                {% blocktrans trimmed with amount=refund_amount|money:request.event.currency %}
                    With to the payment method you used, the refund amount of {{ amount }} <strong>can not be sent back to you automatically</strong>. Instead, the
                    event organizer will need to initiate the transfer manually. Please be patient as this might take a bit longer.
                {% endblocktrans %}
            </div>
        {% endif %}
    {% endif %}

    <form method="post" action="{% eventurl request.event "presale:event.order.cancel.do" secret=order.secret order=order.code %}" data-asynctask>
        {% csrf_token %}
        <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 "No, take me back" %}
                </a>
            </div>
            <div class="col-md-4 col-md-offset-4">
                <button class="btn btn-block btn-danger btn-lg" type="submit">
                    {% trans "Yes, cancel order" %}
                </button>
            </div>
            <div class="clearfix"></div>
        </div>
    </form>

{% endblock %}

{'avg_line_length': 43.08771929824562, 'max_line_length': 163, 'alphanum_fraction': 0.5403094462540716, 'licenses': ['ECL-2.0', 'Apache-2.0'], 'repository_name': 'bsod85/pretix', 'path': 'src/pretix/presale/templates/pretixpresale/event/order_cancel.html', 'size': 2456, 'lang': 'HTML'}