form.html.twig 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. {#
  14. {{ form_label(form.mediaVideo, 'Bande annonce') }}
  15. {{ form_errors(form.mediaVideo) }}
  16. {{ form_widget(form.mediaVideo) }}
  17. #}
  18. </div>
  19. <div class="">
  20. <div class="card mb-3">
  21. <div class="card-header">
  22. {{ form_label(form.mediaVideos, 'Bandes annonces') }}
  23. </div>
  24. <div class="card-body">
  25. <button type="button" id="add_media-video" class="btn btn-link add-another-collection-widget mb-3" data-path="" data-list-selector="#media-video-fields-list">Ajouter une bande annonce</button>
  26. <ul id="media-video-fields-list"
  27. data-prototype="{{ form_widget(form.mediaVideos.vars.prototype)|e }}"
  28. data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
  29. data-widget-counter="{{ form.children|length }}">
  30. {% for mediaVideoField in form.mediaVideos %}
  31. <li class="list-group-item mb-3">
  32. {{ form_widget(mediaVideoField) }}
  33. {{ form_errors(mediaVideoField) }}
  34. </li>
  35. {% else %}
  36. {{ form_widget(form.mediaVideos) }}
  37. {{ form_errors(form.mediaVideos) }}
  38. {% endfor %}
  39. </ul>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="col-md">
  45. <div class="card mb-3">
  46. <div class="card-header">
  47. {{ form_label(form.genres, 'Genres') }}
  48. </div>
  49. <div class="card-body">
  50. <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>
  51. <ul id="genre-fields-list"
  52. data-prototype="{{ form_widget(form.genres.vars.prototype)|e }}"
  53. data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
  54. data-widget-counter="{{ form.children|length }}">
  55. {% for genreField in form.genres %}
  56. <li class="list-group-item mb-3">
  57. {{ form_widget(genreField) }}
  58. {{ form_errors(genreField) }}
  59. </li>
  60. {% else %}
  61. {{ form_widget(form.genres) }}
  62. {{ form_errors(form.genres) }}
  63. {% endfor %}
  64. </ul>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="col-md">
  69. <div class="card mb-3">
  70. <div class="card-header">
  71. {{ form_label(form.realisateurs, 'Réalisateurs') }}
  72. </div>
  73. <div class="card-body">
  74. <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>
  75. <ul id="realisateur-fields-list"
  76. data-prototype="{{ form_widget(form.realisateurs.vars.prototype)|e }}"
  77. data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
  78. data-widget-counter="{{ form.children|length }}">
  79. {% for realisateurField in form.realisateurs %}
  80. <li class="list-group-item mb-3">
  81. {{ form_widget(realisateurField) }}
  82. {{ form_errors(realisateurField) }}
  83. </li>
  84. {% else %}
  85. {{ form_widget(form.realisateurs) }}
  86. {{ form_errors(form.realisateurs) }}
  87. {% endfor %}
  88. </ul>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. {{ form_rest(form) }}
  95. {{ form_end(form) }}