{% extends "pretixcontrol/organizers/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
    <h1>{% trans "Delete sales channel:" %} {{ channel.label }}</h1>
    <form action="" method="post" class="form-horizontal">
        {% csrf_token %}
        {% if is_allowed %}
            <p>
                {% blocktrans trimmed %}
                    Are you sure you want to delete this sales channel?
                {% endblocktrans %}
        {% else %}
            <div class="alert alert-danger">
                {% blocktrans trimmed %}
                    This sales channel cannot be deleted since it has already been used to sell orders or because it is
                    a core element of the system.
                {% endblocktrans %}
            </div>
        {% endif %}
        <div class="form-group submit-group">
            <a href="{% url "control:organizer.channels" organizer=request.organizer.slug %}"
               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 %}
