From a8c96d2b767da21da955be7a8aca55bc7df45a89 Mon Sep 17 00:00:00 2001 From: Sebastian Krebs Date: Wed, 28 Aug 2013 21:01:22 +0200 Subject: [PATCH] Fix collections indentation --- Resources/public/css/layout.css | 4 ++++ Resources/views/Form/form_admin_fields.html.twig | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Resources/public/css/layout.css b/Resources/public/css/layout.css index a1906b72aa..c4a023e26d 100644 --- a/Resources/public/css/layout.css +++ b/Resources/public/css/layout.css @@ -313,6 +313,10 @@ body.sonata-bc { display: none; } +.sonata-bc .form-horizontal .sonata-collection-row-without-label { + margin-left: 0; +} + ul.inputs-list { padding-left: 150px; } diff --git a/Resources/views/Form/form_admin_fields.html.twig b/Resources/views/Form/form_admin_fields.html.twig index 0702667b36..131a175e31 100755 --- a/Resources/views/Form/form_admin_fields.html.twig +++ b/Resources/views/Form/form_admin_fields.html.twig @@ -114,7 +114,7 @@ file that was distributed with this source code. {% if sonata_admin is not defined or not sonata_admin_enabled or not sonata_admin.field_description %}
{{ form_label(form, label|default(null)) }} -
+
{{ form_widget(form) }} {% if errors|length > 0 %}
@@ -133,7 +133,8 @@ file that was distributed with this source code. {% endif %} {% endblock %} -
+ {% set has_label = sonata_admin.field_description.options.name is defined or label is not sameas(false) %} +
{{ form_widget(form) }} @@ -166,7 +167,7 @@ file that was distributed with this source code. {% spaceless %} {% if prototype is defined %} {% set child = prototype %} - {% set attr = attr|merge({'data-prototype': block('collection_widget_row'), 'data-prototype-name': prototype.vars.name, 'class': attr.class|default('') ~ ' controls' }) %} + {% set attr = attr|merge({'data-prototype': block('collection_widget_row'), 'data-prototype-name': prototype.vars.name, 'class': attr.class|default('') }) %} {% endif %}
{{ form_errors(form) }}