{% extends "pretixcontrol/events/create_base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block form %}
    <fieldset>
        <legend>{% trans "General information" %}</legend>
        {% bootstrap_field form.name layout="control" %}
        <div class="form-group">
            <label class="col-md-3 control-label" for="{{ form.slug.id_for_label }}">{{ form.slug.label }}</label>
            <div class="col-md-9 form-inline">
                <button class="btn btn-default pull-right" type="button" id="event-slug-random-generate"
                        data-rng-url="{% url "control:events.add.slugrng" organizer=organizer.slug %}">
                    {% trans "Set to random" %}
                </button>
                {% bootstrap_field form.slug form_group_class="helper-display-inline" show_label=False layout="inline" %}
                <div class="help-block">
                    {% blocktrans trimmed %}
                        This is the address users can buy your tickets at. Should be short, only contain lowercase
                        letters and numbers, and must be unique among your events. We recommend some kind of
                        abbreviation or a date with less than 10 characters that can be easily remembered, but you
                        can also choose to use a random value.
                    {% endblocktrans %}
                </div>
                <div class="help-block">
                    {% blocktrans trimmed %}
                        We will also use this in some places like order codes, invoice numbers or bank transfer
                        references as an abbreviation to reference this event.
                    {% endblocktrans %}
                </div>
            </div>
        </div>
        {% bootstrap_field form.date_from layout="control" horizontal_field_class="col-md-9 splitdatetimerow" %}
        {% bootstrap_field form.date_to layout="control" horizontal_field_class="col-md-9 splitdatetimerow" %}
        {% bootstrap_field form.location layout="control" %}
        {% bootstrap_field form.currency layout="control" %}
        {% bootstrap_field form.tax_rate addon_after="%" layout="control" %}
    </fieldset>
    <fieldset>
        <legend>{% trans "Display settings" %}</legend>
        {% bootstrap_field form.locale layout="control" %}
        {% bootstrap_field form.timezone layout="control" %}
    </fieldset>
    {% if form.presale_start %}
        <fieldset>
            <legend>{% trans "Timeline" %}</legend>
            {% bootstrap_field form.presale_start layout="control" horizontal_field_class="col-md-9 splitdatetimerow" %}
            {% bootstrap_field form.presale_end layout="control" horizontal_field_class="col-md-9 splitdatetimerow" %}
        </fieldset>
    {% endif %}
{% endblock %}
