{% extends 'front/layouts/base.html.twig' %}
{% import "front/request/form_extra_fields.html.twig" as formExtraFields %}
{% block title %}
{{ 'front.form.index'|trans({}, 'front') }}
{% endblock %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('front/form') }}
{{ encore_entry_link_tags('admin-dependences-css') }}
{% endblock %}
{% block main %}
{{ include('front/layouts/header.html.twig') }}
{% if survey is defined and survey %}
<input type="hidden" id="surveyId" value="{{ survey.id }}"/>
{% set requestFormId = numRequest %}
<div class="head_support_wfo_wrapper">
<div class="container">
<h2>{{ survey.valueText }}</h2>
</div>
</div>
<div id='div_text' class="div_text" style="display:none; color: black"></div>
<div id="survey_questions">
{% for question in questions %}
<input type="hidden" class="responses" name="responses[{{ question.id }}]" id="responses--{{ question.id }}">
<div data-prentds="{{ question.ids_related_choices }}"
class="qtn_div_qs
{% if question.dependency %}hide-question{% else %}show_without_dependency{% endif %}"
{% if question.dependency %}data-show-question=",{{ question.ids_related_choices }},"
{% else %}data-start=""
{% endif %}
>
<div class="step_support_wfo_wrapper" style="{% if survey.surveyColor %} background: {{ survey.surveyColor }} !important {% endif %}" id="step_support_wfo_wrapper--{{ question.id }}" data-idquestion="{{ question.id }}">
<div class="container">
<h3 class="nav_text" id="title_step_support_wfo_wrapper--{{ question.id }}" data-title="{{ question.principal }}">
{{ question.principal }}
</h3>
</div>
</div>
<div class="steps_choices_wrapper--{{ question.id }}">
<div class="container">
<div class="steps_choices_items">
{% for choice in question.choices %}
<style>
{#{% if choice.onClickColorBg %}
.steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
background-color: {{ choice.onClickColorBg }} ;
border: 1px solid {{ choice.onClickColorBg }} ;
}
{% endif %} #}
{% if survey is defined and survey.surveyColor %}
.steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
background-color: {{ survey.surveyColor }} !important;
border: 1px solid {{ survey.surveyColor }} !important ;
}
{% elseif choice.onClickColorBg %}
.steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
background-color: {{ choice.onClickColorBg }} !important;
border: 1px solid {{ choice.onClickColorBg }} !important;
}
{% endif %}
{% if choice.onClickColorText %}
.steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
color: {{ choice.onClickColorText }} !important;
}
{% endif %}
</style>
<div class="choice_item choiced--{{choice.value_survey_id}} clicked_choice
{% if choice.isOther %} form_other_btn {% endif %}
{#{% if choice.hasDescription %} form_other_btn {% endif %} #}
{% if choice.hasFile %} hasFile {% endif %}"
data-type="{{ question.type }}"
data-valuesurvey="{{ choice.value_survey_id }}"
data-optionvalue="{{ choice.option_value_id }}"
data-question="{{ question.id }}"
data-valueText="{{ choice.valueText }}"
data-checklabel="{{ choice.checkboxLabel }}"
data-clickcolorbg="{{ survey.surveyColor ?? choice.onClickColorBg }}"
data-hasdescription="{{ choice.hasDescription ? true : false }}"
data-hasfile="{{ choice.hasFile ? true : false }}"
data-isother="{{ choice.isOther ? true : false }}"
data-hasfile="{{ choice.hasFile ? true : false }}"
data-previous=false
data-parent="{{ question.ids_related_choices }}"
data-actif=""
>
<span
class="num num-{{ choice.value_survey_id }} radius_10 question_choice"
name="question[{{ question.id }}][]"
>
{{ choice.checkboxLabel }}
</span>
<span>{{ choice.valueText }}</span>
{% if choice.descriptionLabel %}
<span>
<span class="tooltip">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
<path id="info-circle-svgrepo-com" d="M1,12A11,11,0,1,1,12,23,11,11,0,0,1,1,12Zm9.25-1a1,1,0,0,1,1-1h1.5a1,1,0,0,1,1,1v7a1,1,0,0,1-1,1h-1.5a1,1,0,0,1-1-1ZM14,7a2,2,0,1,0-2,2A2,2,0,0,0,14,7Z" transform="translate(-1 -1)" fill="#3c2a5c" fill-rule="evenodd"/>
</svg>
<span class="tooltiptext">
{{ choice.descriptionLabel | raw }}
</span>
</span>
</span>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endfor %}
<div class="detail_question">
</div>
<div class="lastStepForOptionSelected">
{{ include('front/request/form_detail.html.twig') }}
</div>
</div>
{% else %}
<div class="container">
<div class="center-block">{{ 'front.form.form_not_disponible'|trans({}, 'front') }}</div>
</div>
{% endif %}
<!-- COOKIES -->
{{ include('front/layouts/cookies.html.twig') }}
{{ include('front/cookies/preferences.html.twig') }}
{% endblock main %}
{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('front-form-js') }}
<script>
var radioType = "{{ constant('App\\Entity\\Configuration\\Option::TYPE_RADIO') }}";
</script>
{% endblock %}