Procházet zdrojové kódy

Merge pull request #2138 from Bladrak/mopaCp

Ensure that forms render properly withouth MopaBootstrap
Thomas před 11 roky
rodič
revize
cd30d5496e
1 změnil soubory, kde provedl 13 přidání a 0 odebrání
  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 %}