Skip to content

Commit 990cbc0

Browse files
committed
added BC fallback
1 parent 9301965 commit 990cbc0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/bundle/Resources/views/themes/admin/content/form_fields.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
{{- block('form_label') }}
6969
</div>
7070
<div{% with { attr: widget_wrapper_attr } %}{{ block('attributes') }}{% endwith %}>
71-
{{- form_widget(form, {'attr': attr}) -}}
71+
{{- form_widget(form, { attr }) -}}
7272
</div>
7373
<div class="ibexa-form-error">
7474
{{- block('form_errors') -}}

src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,9 @@
389389
{%- set type = type|default('text') -%}
390390
{%- set is_text_input = type == 'text' or type == 'number' or force_text|default(false) -%}
391391
{%- if is_text_input -%}
392+
{# @deprecated extra_actions_after in attr will be removed in 5.0, used for BC in 4.6 #}
393+
{%- set extra_actions_after_from_attr = attr.extra_actions_after|default(null) -%}
394+
{%- set attr = attr|filter((value, key) => key != 'extra_actions_after') -%}
392395
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' ibexa-input ibexa-input--text')|trim}) -%}
393396
{%- set empty_placeholder_for_hiding_clear_btn_with_css = ' ' -%}
394397
{%- 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}) -%}
@@ -402,7 +405,7 @@
402405

403406
{% block actions %}
404407
{{ parent() }}
405-
{{ extra_actions_after|default()}}
408+
{{ extra_actions_after|default(extra_actions_after_from_attr)}}
406409
{% endblock %}
407410
{%- endembed -%}
408411
{%- else -%}

0 commit comments

Comments
 (0)