{% extends 'events/display/conference/base.html' if event.type == 'conference' else 'layout/meeting_page_base.html' %}
{% from 'forms/_form.html' import form_header, form_footer, form_fieldset, form_row, form_row_static %}
{% block title %}
{%- trans %}Survey{% endtrans -%}
{% endblock %}
{% block subtitle %}
{{ survey.title }}
{% if event.type != 'conference' %}
({{ event.title }})
{% endif %}
{% endblock %}
{% block description %}
{{ survey.introduction }}
{% endblock %}
{% block content %}
{{ form_header(form, id='survey-questionnaire', orientation='vertical') }}
{% for section in survey.sections if section.children %}
{% call form_fieldset(section.title, section.description|replace('\n', '
'|safe),
render_as_fieldset=section.display_as_section) %}
{% for item in section.children %}
{% if item.type.name == 'question' %}
{{ form_row(form['question_{}'.format(item.id)]) }}
{% elif item.type.name == 'text' %}
{% call form_row_static(single_row=false, skip_label=true) %}
{{ item.description|replace('\n', '
'|safe) }}
{% endcall %}
{% endif %}
{% endfor %}
{% endcall %}
{% endfor %}
{% call form_footer(form) %}
{% if partial_completion and session.user %}
{%- trans %}Save answers{% endtrans -%}
{% endif %}
{% if back_button_endpoint is not none %}
{%- trans %}Back{% endtrans -%}
{% endif %}