From 40871bb3b823e51388662fa924eadc29a8dee3e1 Mon Sep 17 00:00:00 2001 From: tischsoic Date: Sun, 26 Jun 2022 00:55:42 +0200 Subject: [PATCH 1/2] IBX-3092: Dropdown in subfields should have small size --- .../views/themes/admin/content/form_fields.html.twig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig b/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig index cabbb3a4a1..4da87469d0 100644 --- a/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig @@ -49,7 +49,10 @@ {% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' ibexa-label ibexa-data-source__label ibexa-data-source__label')|trim}) %} {% set label_wrapper_attr = label_wrapper_attr|default({})|merge({'class': (label_wrapper_attr.class|default('') ~ ' ibexa-data-source__label-wrapper ibexa-data-source__label-wrapper')|trim}) %} - {% set attr = attr|merge({'class': (attr.class|default('') ~ ' ibexa-data-source__input ibexa-data-source__input ibexa-input--small')|trim}) %} + {% set attr = attr|merge({ + class: (attr.class|default('') ~ ' ibexa-data-source__input ibexa-data-source__input ibexa-input--small')|trim, + is_small: true, + }) %} {% set wrapper_attr = wrapper_attr|default({})|merge({class: (wrapper_attr.class|default('') ~ ' ' ~ wrapper_class)|trim}) %} {% set widget_wrapper_attr = widget_wrapper_attr|default({})|merge({class: (widget_wrapper_attr.class|default('') ~ ' ibexa-data-source__input-wrapper ibexa-data-source__input-wrapper')|trim}) %} From 4bf59cb05ea1f4813e9546abefefdaf6d9068f64 Mon Sep 17 00:00:00 2001 From: tischsoic Date: Mon, 27 Jun 2022 11:08:06 +0200 Subject: [PATCH 2/2] Do not render ibexa-form-error when form is valid --- .../views/themes/admin/content/form_fields.html.twig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig b/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig index 4da87469d0..01d2ae62d6 100644 --- a/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/form_fields.html.twig @@ -65,9 +65,11 @@ {{- form_widget(form, {'attr': attr}) -}} -
- {{- block('form_errors') -}} -
+ {% if form.vars.errors|length > 0 %} +
+ {{- block('form_errors') -}} +
+ {% endif %} {%- endblock %}