瀏覽代碼

Merge pull request #2764 from EmmanuelVella/file

Do not add form-control class to file inputs
Thomas 10 年之前
父節點
當前提交
01b0bce6eb
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Resources/views/Form/form_admin_fields.html.twig

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

@@ -19,7 +19,10 @@ file that was distributed with this source code.
 {%- endblock form_widget %}
 
 {% block form_widget_simple %}
-    {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
+    {% set type = type|default('text') %}
+    {% if type != 'file' %}
+        {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
+    {% endif %}
     {{ parent() }}
 {% endblock form_widget_simple %}