Skip to content

Commit

Permalink
IBX-3092: dropdown in subfield should be small like other fields (#479)
Browse files Browse the repository at this point in the history
* IBX-3092: Dropdown in subfields should have small size

* Do not render ibexa-form-error when form is valid
  • Loading branch information
tischsoic authored Jun 28, 2022
1 parent 0849906 commit 5aa693b
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}) %}

Expand All @@ -62,9 +65,11 @@
<div{% with { attr: widget_wrapper_attr } %}{{ block('attributes') }}{% endwith %}>
{{- form_widget(form, {'attr': attr}) -}}
</div>
<div class="ibexa-form-error">
{{- block('form_errors') -}}
</div>
{% if form.vars.errors|length > 0 %}
<div class="ibexa-form-error">
{{- block('form_errors') -}}
</div>
{% endif %}
</div>
{%- endblock %}

Expand Down

0 comments on commit 5aa693b

Please sign in to comment.