Browse Source

Merge pull request #2145 from patrickli/select2-width

Always add 'form-control' class to select boxes
Thomas 11 years ago
parent
commit
f3e49a32cd
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Resources/views/Form/form_admin_fields.html.twig

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

@@ -106,9 +106,7 @@ file that was distributed with this source code.
         {% endfor %}
         </ul>
     {% else %}
-    {% if sonata_admin.admin and not sonata_admin.admin.getConfigurationPool().getOption('use_select2') %}
-        {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
-    {% endif %}
+    {% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
     <select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
         {% if empty_value is not none %}
             <option value="">