浏览代码

Ensure that forms render properly withouth MopaBootstrap

Hugo Briand 11 年之前
父节点
当前提交
33c391e5ca
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      Resources/views/Form/form_admin_fields.html.twig

+ 13 - 0
Resources/views/Form/form_admin_fields.html.twig

@@ -8,6 +8,19 @@ For the full copyright and license information, please view the LICENSE
 file that was distributed with this source code.
 
 #}
+
+{% extends 'form_div_layout.html.twig' %}
+
+{% block form_widget_simple %}
+    {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
+    {{ parent() }}
+{% endblock form_widget_simple %}
+
+{% block textarea_widget %}
+    {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
+    {{ parent() }}
+{% endblock textarea_widget %}
+
 {# Labels #}
 {% block form_label %}
 {% spaceless %}