Pārlūkot izejas kodu

Merge pull request #2764 from EmmanuelVella/file

Do not add form-control class to file inputs
Thomas 10 gadi atpakaļ
vecāks
revīzija
01b0bce6eb
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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 %}