{% extends 'events/management/base.html' %}
{% from 'forms/_form.html' import form_header, form_footer, form_row, form_rows, form_fieldset %}

{% block title %}{% trans %}Event protection{% endtrans %}{% endblock %}

{% block content %}
    {{ form_header(form, id='event-protection-form', extra_attrs={'data-confirm-close-unsaved': True}) }}
    {{ form_row(form.permissions, skip_label=true) }}
    {{ form_rows(form, skip=form.priv_fields.union(['permissions', 'subcontrib_speakers']),
                 widget_attrs={'own_no_access_contact': {'placeholder': event.no_access_contact}}) }}
    {% call form_fieldset(_("Session coordinator rights"), collapsible=true, initially_collapsed=true) %}
        <div class="action-box highlight">
            <div class="section">
                <div class="icon icon-info"></div>
                <div class="text">
                    <div class="label">{% trans %}Basic rights{% endtrans %}</div>
                    <div>
                        <div>{% trans %}Restricted session timetable management (add contributions, create breaks){% endtrans %}</div>
                        <div>{% trans %}View contribution list (no modifications){% endtrans %}</div>
                        <div>{% trans %}View session main data (no modifications){% endtrans %}</div>
                    </div>
                </div>
            </div>
        </div>
        {{ form_rows(form, fields=form.priv_fields) }}
    {% endcall %}
    {% if event.type != 'lecture' %}
        {% call form_fieldset(_('Subcontribution rights'), collapsible=true, initially_collapsed=true) %}
            {{ form_rows(form, fields=['subcontrib_speakers']) }}
        {% endcall %}
    {% endif %}
    {% call form_footer(form) %}
        <input class="i-button big highlight" type="submit" value="{% trans %}Save{% endtrans %}"
               data-disabled-until-change data-save-reminder>
    {% endcall %}
{% endblock %}
