src/Trinity/FormsBundle/Resources/views/default/form.html.twig line 1

Open in your IDE?
  1. {% trans_default_domain 'forms' %}
  2. <div class="plugin-forms">
  3.     {% if saved %}
  4.         <div class="message">
  5.             <div class="alert alert-success" role="alert">
  6.                 {% if config.message is defined and config.message is not empty %}
  7.                     {{config.message|raw}}
  8.                 {% else %}
  9.                     {{'Het formulier is succesvol verzonden.'|trans}}
  10.                 {% endif %}
  11.             </div>
  12.         </div>
  13.     {% elseif error %}
  14.         <div class="alert alert-danger">
  15.             {{error|trans|raw}}
  16.         </div>
  17.     {% endif %}
  18.     {% if (saved and hide_send) %}
  19.     {% else %}
  20.        {% if inline_error %}
  21.                <div class="alert alert-danger">
  22.                        {{inline_error|trans}}
  23.                </div>
  24.        {% endif %}
  25.                 <form method="post" enctype="multipart/form-data" style="display: none; width: 0px; height: 0px;">
  26.             <input type="hidden" name="manual_upload" value="1">
  27.             <input type="file" name="file[]" id="upload_button" multiple>
  28.             <button type="submit">{{'Uploaden'|trans({})|raw}}</button>
  29.         </form>
  30.         <form id="forms-bundle-form" method="post" enctype="multipart/form-data">
  31.             <div class="contains-form">
  32.                 <div class="row">
  33.                     <div class="field-pot" style="">
  34.                         <div class="form-question">
  35.                             <input id="frm-lbl-3" name="form-check" type="text" value="">
  36.                         </div>
  37.                     </div>
  38.                     {% set firstField = true %}
  39.                     {% for Question in questions %}
  40.                         {% if Question.position == 0 and firstField != true %}
  41.                             </div>
  42.                             <div class="row">
  43.                         {% endif %}
  44.                         <div class="col-md-{{Question.width}}" style="{% if Question.hidden and config.show_hidden is not defined %}display: none;{% endif %}">
  45.                             <div class="form-question {{Question.classes}}">
  46.                                 {% include [':forms_elements:' ~ Question.getType ~ '.html.twig', '@TrinityForms/elements/' ~ Question.getType ~ '.html.twig'] %}
  47.                             </div>
  48.                         </div>
  49.                          {% set firstField = false %}
  50.                         {% if loop.first == true %}
  51.                             {% if settings.getIsCatalog() and product is defined and product is not empty %}
  52.                                 <div style="display: none;">
  53.                                     <input name="form[productid]" type="text" value="{{product.id}}">
  54.                                 </div>
  55.                                 <div class="col-md-12" data-type="subject">
  56.                                     <div class="field-label">Onderwerp</div>
  57.                                     <strong>{{product.label}}</strong>
  58.                                 </div>
  59.                             {% endif %}
  60.                         {% endif %}
  61.                     {% endfor %}
  62.                                         {% if settings.hasGoogleRecaptcha() %}
  63.                                             <div class="col-md-12">
  64.                                                 <div style="padding-bottom: 10px;">
  65.                                                     {{ settings.getGoogleRecaptchaWidget() | raw }}
  66.                                                 </div>
  67.                                             </div>
  68.                                         {% endif %}
  69.                 </div>
  70.             </div>
  71.             <div class="form-footer">
  72.                 {% if config.show_clear is defined and (Form.hideClearButton is null or Form.hideClearButton == 0) %}
  73.                     <button type="reset" class="btn">{{'Leegmaken'|trans}}</button>
  74.                 {% endif %}
  75.                 <button type="submit" class="btn primary forms-bundle">{{'Versturen'|trans}}</button>
  76.             </div>
  77.                         <input type="hidden" name="form-bundle-submit" value="{{ Form.id }}" />
  78.         </form>
  79. <style>
  80. .field-pot{
  81.     display: none;
  82. }
  83. </style>
  84. {% endif %}
  85. </div>