{% set fieldset = namespace(open=false) %} {% for option in options %} {% set settings = options[option] %} {% if not settings.requires or (current_user.is_authenticated and current_user.is_admin()) or current_user.get_attribute(settings.requires) %} {% if not fieldset.open %}
{% set fieldset.open = True %}{% endif %} {% if settings.type == "divider" %}
{% set fieldset.open = False %} {% elif settings.type == "info" %}

{{ settings.help|markdown|safe }}

{% else %}
{% if settings.type == "toggle" %} {% if "tooltip" in settings %}

{{ settings.tooltip }}

{% endif %} {% elif settings.type == "file" %} {% if "tooltip" in settings %} {% endif %} {% elif settings.type == "string" %} {% if "tooltip" in settings %} {% endif %} {% elif settings.type == "date" %} {% if "tooltip" in settings %} {% endif %} {% elif settings.type == "daterange" %}
to
{% if "tooltip" in settings %} {% endif %} {% elif settings.type == "textarea" %} {% elif settings.type == "choice" %} {% if "tooltip" in settings %} {% endif %} {% elif settings.type == "multi" %}
{% if "tooltip" in settings %} {% endif %}
{% endif %}
{% endif %} {% endif %} {% endfor %} {% if fieldset_open %} {% endif %}