{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Delete entries" %}{% endblock %}
{% block content %}
    <h1>{% trans "Delete entries" %}</h1>
    <form action="" method="post" class="form-horizontal">
        {% csrf_token %}
        {% if allowed %}
            <p>{% blocktrans %}Are you sure you want to delete the following entries?{% endblocktrans %}</p>
            <ul>
                {% for s in allowed %}
                    <li>
                        {{ s }}
                        <input type="hidden" name="entry" value="{{ s.pk }}">
                    </li>
                {% endfor %}
            </ul>
        {% endif %}
        {% if forbidden %}
            <p>{% blocktrans trimmed %}The following entries can't be deleted as they already have a voucher attached.{% endblocktrans %}</p>
            <ul>
                {% for s in forbidden %}
                    <li>
                        {{ s }}
                        <input type="hidden" name="entry" value="{{ s.pk }}">
                    </li>
                {% endfor %}
            </ul>
        {% endif %}
        <div class="form-group submit-group">
            <a href="{% url "control:event.orders.waitinglist" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel">
                {% trans "Cancel" %}
            </a>
            <button type="submit" class="btn btn-danger btn-save" value="delete_confirm" name="action">
                {% trans "Delete" %}
            </button>
        </div>
    </form>
{% endblock %}
