templates/front/request/index.html.twig line 1

Open in your IDE?
  1. {% extends 'front/layouts/base.html.twig' %}
  2. {% import "front/request/form_extra_fields.html.twig" as formExtraFields %} 
  3. {% block title %}
  4.     {{ 'front.form.index'|trans({}, 'front') }}    
  5. {% endblock %}
  6. {% block stylesheets %}
  7.     {{ parent() }}
  8.     {{ encore_entry_link_tags('front/form') }}
  9.     {{ encore_entry_link_tags('admin-dependences-css') }}
  10. {% endblock %}
  11. {% block main %}
  12.     {{ include('front/layouts/header.html.twig') }}
  13.     
  14.     {% if survey is defined and survey %}
  15.         <input type="hidden" id="surveyId" value="{{ survey.id }}"/>
  16.         {% set requestFormId =  numRequest  %}
  17.      
  18.         <div class="head_support_wfo_wrapper">
  19.             <div class="container">
  20.                 <h2>{{ survey.valueText }}</h2>
  21.             </div>
  22.         </div>
  23.         <div id='div_text' class="div_text" style="display:none; color: black"></div>
  24.         <div id="survey_questions"> 
  25.             {% for question in questions %} 
  26.                 <input type="hidden" class="responses" name="responses[{{ question.id }}]" id="responses--{{ question.id }}">
  27.             
  28.                 <div     data-prentds="{{ question.ids_related_choices }}"
  29.                         class="qtn_div_qs 
  30.                         {% if question.dependency %}hide-question{% else %}show_without_dependency{% endif %}" 
  31.                         {% if question.dependency %}data-show-question=",{{ question.ids_related_choices }},"
  32.                         {% else %}data-start=""
  33.                         {% endif %}
  34.                 >
  35.                     <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 }}">
  36.                         <div class="container">
  37.                             <h3 class="nav_text"   id="title_step_support_wfo_wrapper--{{ question.id }}" data-title="{{ question.principal }}">
  38.                                 {{ question.principal }}
  39.                             </h3>
  40.                         </div>
  41.                     </div>
  42.                     <div class="steps_choices_wrapper--{{ question.id }}">
  43.                         <div class="container">
  44.                             <div class="steps_choices_items">
  45.                                 {% for choice in question.choices %}
  46.                                     <style>
  47.                                         {#{% if choice.onClickColorBg %}
  48.                                             .steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
  49.                                                 background-color: {{ choice.onClickColorBg }} ;
  50.                                                 border:  1px solid  {{ choice.onClickColorBg }} ;
  51.                                             }
  52.                                         {% endif %}    #}
  53.                                         {% if survey is defined and survey.surveyColor %}  
  54.                                             .steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
  55.                                                 background-color: {{ survey.surveyColor }} !important;
  56.                                                 border:  1px solid  {{ survey.surveyColor }} !important ;
  57.                                             }
  58.                                         {% elseif choice.onClickColorBg %}
  59.                                             .steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
  60.                                                 background-color: {{ choice.onClickColorBg }} !important;
  61.                                                 border:  1px solid  {{ choice.onClickColorBg }} !important;
  62.                                             }
  63.                                         {% endif %}
  64.                                         {% if choice.onClickColorText %}
  65.                                             .steps_choices_items .choice_item.active .num.num-{{ choice.value_survey_id }} {
  66.                                                 color:   {{ choice.onClickColorText }} !important;
  67.                                             }
  68.                                         {% endif %}    
  69.                                     </style>
  70.     
  71.                                     <div class="choice_item  choiced--{{choice.value_survey_id}} clicked_choice
  72.                                         {% if choice.isOther %} form_other_btn {% endif %}
  73.                                         {#{% if choice.hasDescription %} form_other_btn {% endif %} #}
  74.                                         {% if choice.hasFile %} hasFile {% endif %}"
  75.                                         data-type="{{ question.type }}"
  76.                                         data-valuesurvey="{{ choice.value_survey_id }}"
  77.                                         data-optionvalue="{{ choice.option_value_id }}" 
  78.                                         data-question="{{ question.id }}" 
  79.                                         data-valueText="{{ choice.valueText }}"
  80.                                         data-checklabel="{{ choice.checkboxLabel }}"
  81.                                         data-clickcolorbg="{{ survey.surveyColor ?? choice.onClickColorBg }}"
  82.                                         data-hasdescription="{{ choice.hasDescription ? true : false }}" 
  83.                                         data-hasfile="{{ choice.hasFile ? true : false }}" 
  84.                                         data-isother="{{ choice.isOther ? true : false }}"
  85.                                         data-hasfile="{{ choice.hasFile ? true : false }}"
  86.                                         data-previous=false
  87.                                         data-parent="{{ question.ids_related_choices }}"
  88.                                         data-actif=""            
  89.                                         >
  90.                                         <span 
  91.                                             class="num num-{{ choice.value_survey_id }} radius_10 question_choice" 
  92.                                             name="question[{{ question.id }}][]" 
  93.                                         >
  94.                                             {{ choice.checkboxLabel }}
  95.                                         </span>
  96.                                         <span>{{ choice.valueText }}</span>
  97.                                         {% if choice.descriptionLabel %}
  98.                                             <span> 
  99.                                                 <span class="tooltip">
  100.                                                     <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
  101.                                                         <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"/>
  102.                                                     </svg>                                  
  103.                                                     <span class="tooltiptext">                                    
  104.                                                         {{ choice.descriptionLabel | raw }}
  105.                                                     </span>
  106.                                                 </span>
  107.                                             </span>
  108.                                         {% endif %}        
  109.                                     </div>
  110.                                 {% endfor %}
  111.                             </div>
  112.                         </div>
  113.                     </div>
  114.                 </div>    
  115.             {% endfor %}
  116.             
  117.             <div class="detail_question">
  118.             </div>
  119.             <div class="lastStepForOptionSelected">
  120.                 {{ include('front/request/form_detail.html.twig') }} 
  121.             </div> 
  122.         
  123.         </div>
  124.     {% else %}
  125.         <div class="container">
  126.             <div class="center-block">{{ 'front.form.form_not_disponible'|trans({}, 'front') }}</div>
  127.         </div> 
  128.     {% endif %}
  129.     <!-- COOKIES -->
  130.     {{ include('front/layouts/cookies.html.twig') }}
  131.     {{ include('front/cookies/preferences.html.twig') }}
  132. {% endblock main %}
  133. {% block javascripts %}
  134.     {{ parent() }}
  135.     {{ encore_entry_script_tags('front-form-js') }}
  136.     <script>
  137.         var    radioType =  "{{ constant('App\\Entity\\Configuration\\Option::TYPE_RADIO') }}";
  138.     </script>
  139. {% endblock %}