Skip to content

Commit

Permalink
added BC fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Nov 19, 2024
1 parent 664d3c0 commit 25325d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{{- block('form_label') }}
</div>
<div{% with { attr: widget_wrapper_attr } %}{{ block('attributes') }}{% endwith %}>
{{- form_widget(form, {'attr': attr}) -}}
{{- form_widget(form, { attr }) -}}
</div>
<div class="ibexa-form-error">
{{- block('form_errors') -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@
{%- set type = type|default('text') -%}
{%- set is_text_input = type == 'text' or type == 'number' or force_text|default(false) -%}
{%- if is_text_input -%}
{# @deprecated extra_actions_after in attr will be removed in 5.0, used for BC in 4.6 #}
{%- set extra_actions_after_from_attr = attr.extra_actions_after|default(null) -%}
{%- set attr = attr|filter((value, key) => key != 'extra_actions_after') -%}
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' ibexa-input ibexa-input--text')|trim}) -%}
{%- set empty_placeholder_for_hiding_clear_btn_with_css = ' ' -%}
{%- set attr = attr|merge({placeholder: (attr.placeholder is defined and attr.placeholder is not null) ? attr.placeholder : empty_placeholder_for_hiding_clear_btn_with_css}) -%}
Expand All @@ -402,7 +405,7 @@

{% block actions %}
{{ parent() }}
{{ extra_actions_after|default()}}
{{ extra_actions_after|default(extra_actions_after_from_attr)}}
{% endblock %}
{%- endembed -%}
{%- else -%}
Expand Down

0 comments on commit 25325d8

Please sign in to comment.