Pārlūkot izejas kodu

Merge pull request #1093 from pulzarraider/repeated_form_field_fix

Fixed displaying standard form types
Thomas 12 gadi atpakaļ
vecāks
revīzija
1e4dd9e006
1 mainītis faili ar 11 papildinājumiem un 3 dzēšanām
  1. 11 3
      Resources/views/Form/form_admin_fields.html.twig

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

@@ -101,9 +101,17 @@ file that was distributed with this source code.
 
 {% block field_row %}
     {% if sonata_admin is not defined or not sonata_admin_enabled or not sonata_admin.field_description %}
-        {{ form_label(form, label|default(null)) }}
-        {{ form_errors(form) }}
-        {{ form_widget(form) }}
+        <div class="control-group {% if errors|length > 0%} error{% endif %}">
+            {{ form_label(form, label|default(null)) }}
+            <div class="controls">
+                {{ form_widget(form) }}
+                {% if errors|length > 0 %}
+                    <div class="help-inline sonata-ba-field-error-messages">
+                        {{ form_errors(form) }}
+                    </div>
+                {% endif %}
+            </div>
+        </div>
     {% else %}
         <div class="control-group{% if errors|length > 0%} error{%endif%}" id="sonata-ba-field-container-{{ id }}">
             {% block label %}