{% extends "pretixcontrol/organizers/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}
    {% trans "Membership" %}
{% endblock %}
{% block inner %}
    <h1>
        {% trans "Membership" %}
        {% if membership.testmode %}<span class="label label-warning">{% trans "TEST MODE" %}</span>{% endif %}
    </h1>
    <form action="" method="post" class="form-horizontal">
        {% csrf_token %}
        {% if is_allowed %}
            <p>{% blocktrans %}Are you sure you want to delete this membership?{% endblocktrans %}
                {% else %}
            <p>{% blocktrans %}This membership cannot be deleted since it has been used in an order. Change its end date to the past instead.{% endblocktrans %}
        {% endif %}
        </p>
        <div class="form-group submit-group">
            <a href="{% url "control:organizer.customer" organizer=request.organizer.slug customer=membership.customer.identifier %}" class="btn btn-default btn-cancel">
                {% trans "Cancel" %}
            </a>
            {% if is_allowed %}
                <button type="submit" class="btn btn-danger btn-save">
                    {% trans "Delete" %}
                </button>
            {% endif %}
        </div>
    </form>
{% endblock %}
