{% extends "orga/mails/_mail_editor.html" %}
{% load bootstrap4 %}
{% load i18n %}
{% load url_replace %}

{% block email_editor_title_detail %}
  {% translate "Sessions, proposals, speakers" %}
{% endblock %}

{% block recipient_form %}

  {% if form.filter_question or form.filter_search %}
    <div class="offset-md-3 col-md-9 pt-0">
      {% if form.filter_question %}
        <p class="text-muted">
          <span class="fa fa-filter"></span>
          {% blocktranslate trimmed with question=form.filter_question %}
            Recipients filtered by answers to question “{{ question }}”.
          {% endblocktranslate %}
          <a href="?{% url_replace request 'question' '' 'answer' '' 'answer__options' '' %}" class="text-muted">
            <span class="fa fa-times ml-2"></span>
            {% translate "Remove filter" %}
          </a>
        </p>
      {% endif %}
      {% if form.filter_search %}
        <p class="text-muted">
          <span class="fa fa-filter"></span>
          {% blocktranslate trimmed with search=form.filter_search %}
            Recipients filtered by search “{{ search }}”.
          {% endblocktranslate %}
          <a href="?{% url_replace request 'q' '' %}" class="text-muted">
            <span class="fa fa-times ml-2"></span>
            {% translate "Remove filter" %}
          </a>
        </p>
      {% endif %}
    </div>
  {% endif %}
  <div class="form-group row">
    <label for="id_state" class="col-md-3 col-form-label">{{ form.state.label }}
      <br>
      <span class="optional">{% translate "Optional" context "form field" %}</span>
    </label>
    <div class="col-md-9 d-flex align-items-center">
      {% bootstrap_field form.state layout='inline' form_group_class='d-inline-flex col-md-6 pl-0 mr-3' %}
      {% bootstrap_field form.pending_state__isnull layout='inline' form_group_class='d-inline-flex' %}
    </div>
  </div>
  {% if form.submission_type %}{% bootstrap_field form.submission_type layout='event' %}{% endif %}
  {% if form.track %}{% bootstrap_field form.track layout='event' %}{% endif %}
  {% if form.content_locale %}{% bootstrap_field form.content_locale layout='event' %}{% endif %}
  {% if form.tags %}{% bootstrap_field form.tags layout='event' %}{% endif %}

  {% bootstrap_field form.submissions layout='event' %}
  {% bootstrap_field form.speakers layout='event' %}

{% endblock %}
