mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
[Admin] Fix merging attr in back button
This commit is contained in:
parent
e4e883b22a
commit
ae503f8b81
1 changed files with 13 additions and 9 deletions
|
|
@ -83,18 +83,22 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro cancel(params = {}) %}
|
{% macro cancel(params = {}) %}
|
||||||
{% set params = {
|
{% set defaultAttr = {
|
||||||
class: null,
|
|
||||||
text: 'sylius.ui.cancel'|trans,
|
|
||||||
type: 'button'
|
|
||||||
}|merge(params)|merge({
|
|
||||||
attr: {
|
|
||||||
'data-controller': 'back-button',
|
'data-controller': 'back-button',
|
||||||
'data-action': 'click->back-button#goBack',
|
'data-action': 'click->back-button#goBack',
|
||||||
'data-back-button-current-url-value': app.request.uri,
|
'data-back-button-current-url-value': app.request.uri,
|
||||||
'data-back-button-fallback-url-value': params.fallback_url
|
'data-back-button-fallback-url-value': params.fallback_url
|
||||||
|
} %}
|
||||||
|
|
||||||
|
{% set params = {
|
||||||
|
class: null,
|
||||||
|
text: 'sylius.ui.cancel'|trans,
|
||||||
|
type: 'button',
|
||||||
|
attr: {}
|
||||||
}
|
}
|
||||||
}) %}
|
|merge(params)
|
||||||
|
|merge({attr: (params.attr is defined ? params.attr : {})|merge(defaultAttr)})
|
||||||
|
%}
|
||||||
|
|
||||||
{{ _self.default(params) }}
|
{{ _self.default(params) }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue