templates/front/theme1/form/form_footer.html.twig line 1

Open in your IDE?
  1. {% import "front/"~ app.request.server.get('APP_THEME') ~"/form/macro_form.html.twig" as forms %}
  2. <section class="contact-footer text-center text-md-left">
  3.     <div class="container-fluid wrapper">     
  4.         {% if bloc.form %}
  5.             <form id="form-{{bloc.form.id}}" action="{{path('save_form')}}" method="post" class="needs-validation row gx-5 form-recap {{bloc.form.identifier}}" novalidate>
  6.                 {% for message in app.flashes('success-form-' ~ bloc.form.id) %}
  7.                     <div class="alert alert-success alert-form mx-auto">
  8.                         {{ message|raw }}
  9.                     </div>
  10.                 {% endfor %}
  11.                 {% for message in app.flashes('error-form-' ~ bloc.form.id) %}
  12.                     <div class="alert alert-danger alert-form mx-auto">
  13.                         {{ message|raw }}
  14.                     </div>
  15.                 {% endfor %}
  16.                 
  17.                 {% set message = 'validation_form'|trans([],'variable') %}
  18.                 <input type="hidden" value="{{bloc.form.id}}" name="IdForm">
  19.                 <div class="row flex-column flex-md-row justify-content-center"> 
  20.                 {% for item in bloc.form.data %}
  21.                     {% set label = item.label|default(null)%}
  22.                     {% set placeholder = item.placeholder|default(null) %}
  23.                     {% if item.type == "header" %}
  24.                         <div class="col-md-12">
  25.                             {{ forms.header(item.subtype,item.label,item.className) }}
  26.                         </div>
  27.                     {% elseif item.type == "text" or item.type == "textarea" %}
  28.                         <div {% if item.classGlobal is defined %} class="pl-r {{item.classGlobal}} {{item.name == 'ctc_city'?'ctc_city':''}}" {% else %} class="col-form-item form-group {{ item.required == "true" ? 'required' : '' }} {{item.name == 'ctc_city'?'ctc_city':''}} " {% endif %}>
  29.                             {{ forms.input(item.name,item.type,item.className,item.required,item.subtype,label,placeholder,item.maxlength|default(null)) }}
  30.                             <div class="invalid-feedback">
  31.                                 {% if item.name == 'ctc_postcode' %}
  32.                                     {{'validation_code_postal'|trans([],'variable')}}
  33.                                 {% else %}
  34.                                     {{item.ErrorMessage|default(message)}}
  35.                                 {% endif %}
  36.                             </div>
  37.                         </div>
  38.                         
  39.                     {% elseif item.type == "select" %}
  40.                         <div {% if item.classGlobal is defined %} class="col-form-item form-group  {{item.classGlobal}}" {% else %} class="col-form-item form-group {{ item.required == "true" ? 'required' : '' }}" {% endif %}>
  41.                             {{ forms.select(item.type,item.name,item.className,item.required,item.multiple,item.values,label,placeholder) }}
  42.                             <div class="invalid-feedback">
  43.                                 {{item.ErrorMessage|default(message)}}
  44.                             </div>
  45.                         </div>
  46.                     {# {% elseif item.type == "textarea" %}
  47.                         <div {% if item.classGlobal is defined %} class="pl-r  {{item.classGlobal}}" {% else %} class="col-sm-12" {% endif %}>
  48.                             <div class="form-group {{ item.required == "true" ? 'required' : '' }}">
  49.                                 {{ forms.textarea(item.name,item.type,item.className,item.required,item.subtype,label,placeholder,item.rows) }}
  50.                                 <div class="invalid-feedback">
  51.                                     {{item.ErrorMessage|default(message)}}
  52.                                 </div>
  53.                             </div>
  54.                         </div> #}
  55.                     {% elseif item.type == "button" %}
  56.                         <div {% if item.classGlobal is defined %} class="pl-r  {{item.classGlobal}}" {% else %} class="col-form-item form-group button-submit" {% endif %}>
  57.                             <button class="{{item.className}}" type="{{item.subtype}}">{{item.label}}</button>
  58.                         </div>
  59.                     {% elseif item.type == "checkbox-group" %}
  60.                         <div class="{% if item.classGlobal is defined %}pl-r  {{item.classGlobal}}{% else %}col-md-12{% endif %}">
  61.                             {% if label %}<label>{{label}}</label>{% endif %}
  62.                             <div class="form-group {{ item.required == "true" ? 'required' : '' }} {% if item.inline is defined and item.inline == "true" %}d-flex{% endif %}">
  63.                                 {{ forms.checkbox(item.required,item.name,item.values) }}
  64.                             </div>
  65.                         </div>
  66.                     {% elseif item.type == "paragraph" %}
  67.                         <div class="{% if item.classGlobal is defined %}{{item.classGlobal}}{% else %}col-md-12{% endif %}">
  68.                             <p>{{item.label|unescape|raw}}</p>
  69.                         </div>
  70.                     {% endif %}
  71.                 {% endfor %}
  72.                 </div>
  73.                 <input type="hidden" id="{{bloc.form.id}}_captcha" name="g-recaptcha-response" value="">
  74.             </form>
  75.         {% endif %}
  76.     </div>
  77. </section>