浏览代码

Merge pull request #1495 from FabianMartin/expanded_choice_fix

expanded choice fields fixed
Thomas 11 年之前
父节点
当前提交
54ab548155

+ 4 - 1
Resources/views/Form/form_admin_fields.html.twig

@@ -78,7 +78,10 @@ file that was distributed with this source code.
         <ul {{ block('widget_container_attributes_choice_widget') }}>
         {% for child in form %}
             <li>
-                {{ form_label(child, child.vars.label|default(null), { 'in_list_checkbox' : true, 'widget' : form_widget(child) } ) }}
+                {% set form_widget_content %}
+                    form_widget(child)
+                {% endset %}
+                {{ form_label(child, child.vars.label|default(null), { 'in_list_checkbox' : true, 'widget' : form_widget_content } ) }}
             </li>
         {% endfor %}
         </ul>

+ 4 - 1
Resources/views/Form/silex_form_div_layout.html.twig

@@ -6,7 +6,10 @@
         <ul {{ block('widget_container_attributes') }} class="inputs-list">
         {% for child in form %}
             <li>
-                {{ form_label(child, null, { 'in_list_checkbox' : true, 'widget' : form_widget(child) } ) }}
+                {% set form_widget_content %}
+                    form_widget(child)
+                {% endset %}
+                {{ form_label(child, null, { 'in_list_checkbox' : true, 'widget' : form_widget_content } ) }}
             </li>
         {% endfor %}
         </ul>