Browse Source

Contenu du formulaire d'ajout d'un élément mis dans un partiel.

bastien 13 years ago
parent
commit
15b091074a

+ 9 - 0
src/Muzich/CoreBundle/Resources/views/Element/form.add.html.twig View File

@@ -0,0 +1,9 @@
1
+{{ form_errors(form) }}
2
+
3
+{{ form_row(form.name) }}
4
+
5
+{{ form_row(form.url) }}
6
+
7
+{{ form_row(form.tags) }}
8
+
9
+{{ form_rest(form) }}

+ 4 - 9
src/Muzich/HomeBundle/Resources/views/Home/index.html.twig View File

@@ -5,19 +5,14 @@
5 5
 {% block content %}
6 6
 
7 7
   <form action="{{ path('element_add') }}" method="post" {{ form_enctype(add_form) }}>
8
-    {{ form_errors(add_form) }}
9
-
10
-    {{ form_row(add_form.name) }}
11
-      
12
-    {{ form_row(add_form.url) }}
13
-      
14
-    {{ form_row(add_form.tags) }}
15
-
16
-    {{ form_rest(add_form) }}
8
+    
9
+    {% include "MuzichCoreBundle:Element:form.add.html.twig" with { 'form': add_form } %}
17 10
 
18 11
     <input type="submit" />
19 12
   </form>
20 13
 
14
+  #######
15
+
21 16
   {% include "MuzichCoreBundle:SearchElement:form.html.twig" %}
22 17
 
23 18
   {% render "MuzichCoreBundle:Search:doSearchElements" with { 'search': search_object } %}