form.html.twig 3.5 KB

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