{% extends "base.html" %} {% load i18n bootstrap4 %} {% block title %}{% trans "Filters" %} · {{ study }} · {{ block.super }}{% endblock %} {% block content %}

{{ study.name }} — {% trans 'Filters' %}

{% trans 'matches' %}: {{ group.get_subject_count }} / {{ total_count }}

{% csrf_token %} {{ formset.management_form }} {% for error in formset.non_form_errors %} {% endfor %} {% if not study.published %} {# If the form is submitted (e.g. by using the return key on an #} {# input) it will use the first submit button. This one ensures #} {# that the first one is not a delete button. #} {% endif %} {% if not study.published %} {% for form in formset %} {% if not form.description.value %}

{% trans "Add Filter" %}

{{ form.id.as_hidden }} {{ form.group.as_hidden }} {{ form.operator.as_hidden }} {{ form.value.as_hidden }}
{% bootstrap_field form.description show_label=False %}

{% endif %} {% endfor %} {% endif %} {% for form in formset %} {% if form.description.value %} {{ form.id.as_hidden }}
{# duplicated because disabled fields are not posted to the server #} {% bootstrap_field form.description show_label=False%} {{ form.description.as_hidden }}
{% if form.operator.field.choices|length > 1 %}
{% bootstrap_field form.operator show_label=False %}
{% else %} {% endif %}
{% bootstrap_field form.value show_label=False%}
{% if not study.published %}
{% endif %}
{% endif %} {% endfor %}
{% trans "Back" %} {% if not study.published %} {% endif %}
{% endblock %}