form.html.twig 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {{ form_start(form, {'attr': {'class': ''}}) }}
  2. <div class="container-fluid">
  3. <div class="row">
  4. <div class="col-md">
  5. {% form_theme form 'bootstrap_5_horizontal_layout.html.twig' %}
  6. <div class="form-group">
  7. {{ form_row(form.titre) }}
  8. {{ form_row(form.annee) }}
  9. {{ form_row(form.lien) }}
  10. {{ form_row(form.dateSortie) }}
  11. {% form_theme form 'bootstrap_5_layout.html.twig' %}
  12. {{ form_row(form.information) }}
  13. {{ form_label(form.mediaVideo, 'Bande annonce') }}
  14. {{ form_errors(form.mediaVideo) }}
  15. {{ form_widget(form.mediaVideo) }}
  16. </div>
  17. </div>
  18. <div class="col-md">
  19. <div class="card">
  20. <div class="card-header">
  21. {{ form_label(form.genres, 'Genres') }}
  22. </div>
  23. <div class="card-body">
  24. <button type="button" id="add_genre" class="btn btn-link add-another-collection-widget mb-3" data-path="{{ path('videotheque_ajax_genres') }}" data-list-selector="#genre-fields-list">Ajouter un genre</button>
  25. <ul id="genre-fields-list"
  26. data-prototype="{{ form_widget(form.genres.vars.prototype)|e }}"
  27. data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
  28. data-widget-counter="{{ form.children|length }}">
  29. {% for genreField in form.genres %}
  30. <li class="list-group-item mb-3">
  31. {{ form_widget(genreField) }}
  32. {{ form_errors(genreField) }}
  33. </li>
  34. {% else %}
  35. {{ form_widget(form.genres) }}
  36. {{ form_errors(form.genres) }}
  37. {% endfor %}
  38. </ul>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="col-md">
  43. <div class="card">
  44. <div class="card-header">
  45. {{ form_label(form.realisateurs, 'Réalisateurs') }}
  46. </div>
  47. <div class="card-body">
  48. <button type="button" id="add_realisateur" class="btn btn-link add-another-collection-widget mb-3" data-path="{{ path('videotheque_ajax_realisateurs') }}" data-list-selector="#realisateur-fields-list">Ajouter un réalisateur</button>
  49. <ul id="realisateur-fields-list"
  50. data-prototype="{{ form_widget(form.realisateurs.vars.prototype)|e }}"
  51. data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
  52. data-widget-counter="{{ form.children|length }}">
  53. {% for realisateurField in form.realisateurs %}
  54. <li class="list-group-item mb-3">
  55. {{ form_widget(realisateurField) }}
  56. {{ form_errors(realisateurField) }}
  57. </li>
  58. {% else %}
  59. {{ form_widget(form.realisateurs) }}
  60. {{ form_errors(form.realisateurs) }}
  61. {% endfor %}
  62. </ul>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {{ form_rest(form) }}
  69. {{ form_end(form) }}