{% extends "pretixcontrol/organizers/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
    {% if team %}
        <h1>{% trans "Team:" %} {{ team.name }}</h1>
    {% else %}
        <h1>{% trans "Create a new team" %}</h1>
        <p>
            {% blocktrans trimmed %}
                You will be able to add team members in the next step.
            {% endblocktrans %}
        </p>
    {% endif %}
    <form class="form-horizontal" action="" method="post">
        {% csrf_token %}
        {% bootstrap_form_errors form %}
        <fieldset>
            <legend>{% trans "General information" %}</legend>
            {% bootstrap_field form.name layout="control" %}
            {% bootstrap_field form.require_2fa layout="control" %}
        </fieldset>
        <fieldset>
            <legend>{% trans "Organizer permissions" %}</legend>
            {% bootstrap_field form.can_create_events layout="control" %}
            {% bootstrap_field form.can_manage_gift_cards layout="control" %}
            {% bootstrap_field form.can_manage_customers layout="control" %}
            {% bootstrap_field form.can_manage_reusable_media layout="control" %}
            {% bootstrap_field form.can_change_teams layout="control" %}
            {% bootstrap_field form.can_change_organizer_settings layout="control" %}
        </fieldset>
        <fieldset>
            <legend>{% trans "Event permissions" %}</legend>

            {% bootstrap_field form.all_events layout="control" %}
            {% bootstrap_field form.limit_events layout="control" %}
            {% bootstrap_field form.can_change_event_settings layout="control" %}
            {% bootstrap_field form.can_change_items layout="control" %}
            {% bootstrap_field form.can_view_orders layout="control" %}
            {% bootstrap_field form.can_change_orders layout="control" %}
            {% bootstrap_field form.can_checkin_orders layout="control" %}
            {% bootstrap_field form.can_view_vouchers layout="control" %}
            {% bootstrap_field form.can_change_vouchers layout="control" %}
        </fieldset>
        <div class="form-group submit-group">
            <button type="submit" class="btn btn-primary btn-save">
                {% trans "Save" %}
            </button>
        </div>

    </form>
{% endblock %}
