Explorar o código

Do not add form-control class to file inputs

Emmanuel Vella %!s(int64=10) %!d(string=hai) anos
pai
achega
f276e94de1
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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 %}