Browse Source

Merge pull request #2534 from sonata-project/revert-2518-native_collections_horizontal_forms

Revert "add the form-group class conditionally"
Andrej Hudec 10 years ago
parent
commit
8b152635f8
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

@@ -146,14 +146,12 @@ file that was distributed with this source code.
     {% if sonata_admin.admin and sonata_admin.admin.getConfigurationPool().getOption('form_type') == 'horizontal' %}
         {% set label_class = "control-label col-sm-3" %}
         {% set div_class = "col-sm-9 col-md-9" %}
-        {% set wrapper_class = "" %}
     {% else %}
         {% set label_class = "control-label" %}
-        {% set wrapper_class = "form-group" %}
     {% endif%}
 
     {% if sonata_admin is not defined or not sonata_admin_enabled or not sonata_admin.field_description %}
-        <div class="{{ wrapper_class }}{% if errors|length > 0%} has-error{% endif %}">
+        <div class="form-group {% if errors|length > 0%} has-error{% endif %}">
             {{ form_label(form, label|default(null)) }}
             <div class="{% if label is sameas(false) %}sonata-collection-row-without-label{% endif %}">
                 {{ form_widget(form, {'horizontal': false, 'horizontal_input_wrapper_class': ''}) }} {# {'horizontal': false, 'horizontal_input_wrapper_class': ''} needed to avoid MopaBootstrapBundle messing with the DOM #}