{% extends "pretixpresale/event/checkout_base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load rich_text %}
{% load l10n %}
{% load money %}
{% load thumb %}
{% block inner %}
    <p>
        {% trans "For some of the products in your cart, you can choose additional options before you continue." %}
    </p>
    <form class="form-horizontal" method="post" data-asynctask
            data-asynctask-headline="{% trans "We're now trying to book these add-ons for you!" %}">
        {% csrf_token %}
        <div class="panel-group addons" id="questions_group">
            {% for form in forms %}
                <details class="panel panel-default" open>
                    <summary class="panel-heading">
                        <h3 class="panel-title">
                            <span class="sr-only">{% trans "Add-ons:" %}</span>
                            <strong>{{ form.item.name }}{% if form.variation %}
                                – {{ form.variation }}
                            {% endif %}</strong>
                        </h3>
                    </summary>
                    <div id="cp{{ form.pos.pk }}">
                        <div class="panel-body">
                            {% if form.pos.seat %}
                                <p>
                                    <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="16" height="14" viewBox="2 0 16 14"><path d="M7.713 3.573c-.787-.124-1.677.472-1.511 1.529l.857 3.473c.116.579.578 1.086 1.317 1.086h3.166v3.504c0 1.108 1.556 1.113 1.556.019V8.682c0-.536-.376-1.116-1.099-1.116L9.52 7.563l-.752-2.936c-.147-.648-.583-.981-1.055-1.055v.001Z"/><path d="M4.48 5.835a.6.6 0 0 0-.674.725l.71 3.441c.287 1.284 1.39 2.114 2.495 2.114h2.273c.807 0 .811-1.215-.01-1.215H7.188c-.753 0-1.375-.45-1.563-1.289l-.672-3.293c-.062-.3-.26-.452-.474-.483ZM7.433.102a1.468 1.468 0 1 0 0 2.937 1.469 1.469 0 1 0 0-2.937Z"/></svg>{{ form.pos.seat }}
                                </p>
                            {% endif %}
                            {% if form.pos.subevent %}
                                <p>
                                    <span class="fa fa-calendar" aria-hidden="true"></span>
                                    {{ form.pos.subevent.name }} &middot; {{ form.pos.subevent.get_date_range_display_as_html }}
                                    {% if form.pos.event.settings.show_times %}
                                        <span class="fa fa-clock-o" aria-hidden="true"></span>
                                        {{ form.pos.subevent.date_from|date:"TIME_FORMAT" }}
                                    {% endif %}
                                </p>
                            {% endif %}
                            {% include "pretixpresale/event/fragment_addon_choice.html" with form=form %}
                        </div>
                    </div>
                </details>
            {% endfor %}
        </div>
        <div class="row checkout-button-row">
            <div class="col-md-4 col-sm-6">
                <a class="btn btn-block btn-default btn-lg"
                        href="{{ prev_url }}">
                    {% trans "Go back" %}
                </a>
            </div>
            <div class="col-md-4 col-md-offset-4 col-sm-6">
                <button class="btn btn-block btn-primary btn-lg" type="submit">
                    {% trans "Continue" %}
                </button>
            </div>
            <div class="clearfix"></div>
        </div>
    </form>
{% endblock %}
