form.html.twig 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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_row(form.information) }}
  12. {{ form_label(form.mediaVideo, 'Bande annonce') }}
  13. {{ form_errors(form.mediaVideo) }}
  14. {{ form_widget(form.mediaVideo) }}
  15. </div>
  16. </div>
  17. <div class="col">
  18. <div class="card">
  19. <div class="card-header">
  20. {{ form_label(form.genres, 'Genres') }}
  21. </div>
  22. <div class="card-body">
  23. <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>
  24. <ul id="genre-fields-list" class="form-inline"
  25. data-prototype="{{ form_widget(form.genres.vars.prototype)|e }}"
  26. data-widget-tags="{{ '<li class="list-group-item"></li>'|e }}"
  27. data-widget-counter="{{ form.children|length }}">
  28. {% for genreField in form.genres %}
  29. <li class="list-group-item">
  30. {{ form_errors(genreField) }}
  31. {{ form_widget(genreField) }}
  32. </li>
  33. {% else %}
  34. {{ form_errors(form.genres) }}
  35. {{ form_widget(form.genres) }}
  36. {% endfor %}
  37. </ul>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col">
  42. <div class="card">
  43. <div class="card-header">
  44. {{ form_label(form.realisateurs, 'Réalisateurs') }}
  45. </div>
  46. <div class="card-body">
  47. <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>
  48. <ul id="realisateur-fields-list" class="form-inline"
  49. data-prototype="{{ form_widget(form.realisateurs.vars.prototype)|e }}"
  50. data-widget-tags="{{ '<li class="list-group-item"></li>'|e }}"
  51. data-widget-counter="{{ form.children|length }}">
  52. {% for realisateurField in form.realisateurs %}
  53. <li class="list-group-item">
  54. {{ form_errors(realisateurField) }}
  55. {{ form_widget(realisateurField) }}
  56. </li>
  57. {% else %}
  58. {{ form_errors(form.realisateurs) }}
  59. {{ form_widget(form.realisateurs) }}
  60. {% endfor %}
  61. </ul>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. {{ form_rest(form) }}
  68. {{ form_end(form) }}