templates/back/post/_form.html.twig line 1

Open in your IDE?
  1. {{ form_start(form) }}
  2.     <div class="row">
  3.         <div class="col-md-6">
  4.             {{ form_row(form.title) }}
  5.         </div>
  6.     </div>
  7.     <div class="row">
  8.         <div class="col-md-12">
  9.             {{ form_row(form.content) }}
  10.         </div>
  11.     </div>
  12.     <h5 class="mt-5">Gallerie d'images</h5>
  13.     <ul id="email-fields-list"
  14.         data-prototype="{{ form_widget(form.postImages.vars.prototype)|e }}"
  15.         data-widget-tags="{{ '<li style="border-top:2px solid grey;margin-top:20px"></li>'|e }}"
  16.         data-widget-counter="{{ form.postImages|length }}">
  17.         {% for image in form.postImages %}
  18.             <li style="border-top:2px solid grey;margin-top:20px">
  19.                 Image actuelle : <strong>{{ image.vars.value.filename }}</strong><br>
  20.                 {{ form_errors(image.filename) }}
  21.                 {{ form_widget(image.filename) }}
  22.                 {% if image.vars.value.id %}
  23.                     <a href="{{ path('back_image_remove', {'id': image.vars.value.id}) }}" class="btn btn-danger">Supprimer</a>
  24.                 {% endif %}
  25.             </li>
  26.         {% endfor %}
  27.     </ul>
  28.     <button type="button"
  29.             class="add-another-collection-widget btn btn-info"
  30.             data-list-selector="#email-fields-list">Ajouter une image</button>
  31.     <div class="col-md-12 d-flex justify-content-end mt-5">
  32.         <button type="submit" class="btn btn-success">Enregistrer</button>
  33.     </div>
  34. {{ form_end(form) }}