templates/front/theme1/form/contact_form.html.twig line 117

Open in your IDE?
  1. {% import "front/"~ app.request.server.get('APP_THEME') ~"/form/macro_form.html.twig" as forms %}
  2. {{ render(controller('App\\Controller\\Front\\FunctionController::renderContacts')) }}
  3. <section class="contact_form text-center">
  4. <div class="container-fluid wrapper">
  5.     <div class="row justify-content-center">     
  6.         {% if bloc.form %}
  7.         <div class="col-md-8">
  8.             <form id="form-{{bloc.form.id}}" action="{{path('save_form')}}" method="post" class="needs-validation row  form-recap {{bloc.form.identifier}}" enctype="multipart/form-data" novalidate>
  9.                 {% for message in app.flashes('success-form-' ~ bloc.form.id) %}
  10.                     <div class="alert alert-success alert-form mx-auto">
  11.                         {{ message|raw }}
  12.                     </div>
  13.                 {% endfor %}
  14.                 {% for message in app.flashes('error-form-' ~ bloc.form.id) %}
  15.                     <div class="alert alert-danger alert-form mx-auto">
  16.                         {{ message|raw }}
  17.                     </div>
  18.                 {% endfor %}
  19.                 
  20.                 {% set message = 'validation_form'|trans([],'variable') %}
  21.                 <input type="hidden" value="{{bloc.form.id}}" name="IdForm">
  22.                 
  23.                 <div class="contact-border">
  24.                     <div class="icon-header"></div>
  25.                     <div class="row">
  26.                         {% for item in bloc.form.data %}
  27.                             {% set label = item.label|default(null)%}
  28.                             {% set placeholder = item.placeholder|default(null) %}
  29.                             {% if item.type == "text" %}
  30.                                 <div {% if item.classGlobal is defined %} class="col-md-6 col-lg-4 {{item.classGlobal}} {{item.name == 'ctc_city'?'ctc_city':''}}" {% else %} class="col-md-6 col-lg-4 {{item.name == 'ctc_city'?'ctc_city':''}}" {% endif %}>
  31.                                     <div class="form-group">
  32.                                         {{ forms.input(item.name,item.type,item.className,item.required,item.subtype,label,placeholder,item.maxlength|default(null)) }}
  33.                                         <div class="invalid-feedback">
  34.                                             {% if item.name == 'ctc_postcode' %}
  35.                                                 {{'validation_code_postal'|trans([],'variable')}}
  36.                                             {% else %}
  37.                                                 {{item.ErrorMessage|default(message)}}
  38.                                             {% endif %}
  39.                                         </div>
  40.                                     </div>
  41.                                 </div>
  42.                             {% elseif item.type == "select" %}
  43.                                 <div {% if item.classGlobal is defined %} class="col-sm-12 {{item.classGlobal}}" {% else %} class="col-sm-12" {% endif %}>
  44.                                     <div class="form-group">
  45.                                         {{ forms.select(item.type,item.name,item.className,item.required,item.multiple,item.values,label,placeholder) }}
  46.                                         <div class="invalid-feedback">
  47.                                             {{item.ErrorMessage|default(message)}}
  48.                                         </div>
  49.                                     </div>
  50.                                 </div>
  51.                             {% elseif item.type == "textarea" %}
  52.                                 <div {% if item.classGlobal is defined %} class="{{item.classGlobal}}" {% else %} class="col-sm-12" {% endif %}>
  53.                                     <div class="form-group">
  54.                                         {{ forms.textarea(item.name,item.type,item.className|default(''),item.required,item.subtype,item.label|default(''),item.placeholder|default(''),item.rows|default('')) }}
  55.                                         <div class="invalid-feedback">
  56.                                             {{item.ErrorMessage|default(message)}}
  57.                                         </div>
  58.                                     </div>
  59.                                 </div>
  60.                             {% elseif item.type == "file" %}
  61.                                 <div {% if item.classGlobal is defined %} class="col-md-6 col-lg-4 input-file {{item.classGlobal}}" {% else %} class="col-md-6 col-lg-4 text-left" {% endif %}>
  62.                                     <div class="form-group">
  63.                                         {{ forms.input(item.name,item.type,item.className,item.required,item.subtype,label,placeholder,item.maxlength|default(null)) }}
  64.                                         <div class="invalid-feedback">
  65.                                             {{item.ErrorMessage|default(message)}}
  66.                                         </div>
  67.                                     </div>
  68.                                 </div>
  69.                             {% elseif item.type == "button" and item.subtype != "submit" %}
  70.                                  {# <div {% if item.classGlobal is defined %} class="{{item.classGlobal}}" {% else %} class="col-sm-12" {% endif %}>
  71.                                     <div class="form-group">
  72.                                         {{ forms.button(item.name,item.type,item.subtype,item.className,item.label) }}
  73.                                     </div>
  74.                                 </div>  #}
  75.                             {% elseif item.type == "checkbox-group" %}
  76.                                 <div class="{% if item.classGlobal is defined %}{{item.classGlobal}}{% else %}col-sm-12 d-flex justify-content-center{% endif %}">
  77.                                     {# {% if label %}<label>{{label}}</label>{% endif %} #}
  78.                                     <div class="form-group  {% if item.inline is defined and item.inline == "true" %}d-flex{% endif %}">
  79.                                         {{ forms.checkbox(item.required,item.name,item.values) }}
  80.                                     </div>
  81.                                 </div>
  82.                             {% elseif item.type == "paragraph" %}
  83.                                 <div class="{% if item.classGlobal is defined %}{{item.classGlobal}}{% else %}col-sm-12{% endif %}">
  84.                                     <p>{{item.label|unescape|raw}}</p>
  85.                                 </div>
  86.                             {% elseif item.type == "button" and item.subtype == "submit" %}
  87.                                 <div class="col-sm-12 d-flex justify-content-center">
  88.                                     <div class="form-group button-submit">
  89.                                         <button class="btn btn-primary" type="submit">{{item.label }}</button>
  90.                                     </div>
  91.                                 </div>
  92.                             {% endif %}
  93.                             
  94.                         {% endfor %}
  95.                     </div>
  96.                 </div>
  97.                 <input type="hidden" id="{{bloc.form.id}}_captcha" name="g-recaptcha-response" value="">
  98.             </form>
  99.             </div>
  100.         {% endif %}
  101.    
  102.         </div>
  103.     </div>
  104. </section>
  105. {{ render(controller('App\\Controller\\Front\\FunctionController::renderHorairesPageContact')) }}
  106. {{ render(controller('App\\Controller\\Front\\FunctionController::renderMapContact')) }}