فهرست منبع

Correction affichage formulaire principal

François Drouhard 1 سال پیش
والد
کامیت
2e57020577
2فایلهای تغییر یافته به همراه30 افزوده شده و 27 حذف شده
  1. 3 0
      src/Form/FilmType.php
  2. 27 27
      templates/videotheque/form.html.twig

+ 3 - 0
src/Form/FilmType.php

@@ -47,6 +47,9 @@ class FilmType extends AbstractType
             ])
             ->add('information', TextareaType::class, [
                 'required' => false,
+                'attr'  => [
+                    'rows'  => 5
+                ]
             ])
             ->add('genres', CollectionType::class, [
                 'entry_type'    =>  GenreType::class,

+ 27 - 27
templates/videotheque/form.html.twig

@@ -17,12 +17,35 @@
                     {{ form_errors(form.mediaVideo) }}
                     {{ form_widget(form.mediaVideo) }}
                     #}
-                    
+                </div>
+                <div class="">
+                    <div class="card mb-3">
+                        <div class="card-header">
+                            {{ form_label(form.mediaVideos, 'Bandes annonces') }}
+                        </div>
+                        <div class="card-body">
+                            <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>
+                            <ul id="media-video-fields-list"
+                                data-prototype="{{ form_widget(form.mediaVideos.vars.prototype)|e }}"
+                                data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
+                                data-widget-counter="{{ form.children|length }}">
+                                {% for mediaVideoField in form.mediaVideos %}
+                                <li class="list-group-item mb-3">
+                                    {{ form_widget(mediaVideoField) }}
+                                    {{ form_errors(mediaVideoField) }}
+                                </li>
+                                {% else %}
+                                    {{ form_widget(form.mediaVideos) }}
+                                    {{ form_errors(form.mediaVideos) }}
+                                {% endfor %}
+                            </ul>
+                        </div>
+                    </div>
                 </div>
             </div>
 
             <div class="col-md">
-                <div class="card">
+                <div class="card mb-3">
                     <div class="card-header">
                         {{ form_label(form.genres, 'Genres') }}
                     </div>
@@ -46,7 +69,7 @@
                 </div>
             </div>
             <div class="col-md">
-                <div class="card">
+                <div class="card mb-3">
                     <div class="card-header">
                         {{ form_label(form.realisateurs, 'Réalisateurs') }}
                     </div>
@@ -69,30 +92,7 @@
                     </div>
                 </div>
             </div>
-            <div class="">
-                <div class="card">
-                    <div class="card-header">
-                        {{ form_label(form.mediaVideos, 'Bandes annonces') }}
-                    </div>
-                    <div class="card-body">
-                        <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>
-                        <ul id="media-video-fields-list"
-                            data-prototype="{{ form_widget(form.mediaVideos.vars.prototype)|e }}"
-                            data-widget-tags="{{ '<li class="list-group-item mb-3"></li>'|e }}"
-                            data-widget-counter="{{ form.children|length }}">
-                            {% for mediaVideoField in form.mediaVideos %}
-                            <li class="list-group-item mb-3">
-                                {{ form_widget(mediaVideoField) }}
-                                {{ form_errors(mediaVideoField) }}
-                            </li>
-                            {% else %}
-                                {{ form_widget(form.mediaVideos) }}
-                                {{ form_errors(form.mediaVideos) }}
-                            {% endfor %}
-                        </ul>
-                    </div>
-                </div>
-            </div>
+            
         </div>
     </div>
     {{ form_rest(form) }}