Skip to content

Commit

Permalink
bug #6155 fix: incorrect display of html attributes on detail page (R…
Browse files Browse the repository at this point in the history
…omaixn)

This PR was merged into the 4.x branch.

Discussion
----------

fix: incorrect display of html attributes on detail page

The following code :
    `->setHtmlAttributes(['data-foo' => 'bar', 'autofocus' => 'autofocus'])`

Display this in the HTML:
`data-foo="barautofocus=autofocus"`

<!--
Thanks for your contribution! If you are proposing a new feature that is complex,
please open an issue first so we can discuss about it.

Note: all your contributions adhere implicitly to the MIT license
-->

Commits
-------

a7235ae fix: incorrect display of html attributes
  • Loading branch information
javiereguiluz committed Feb 27, 2024
2 parents e38f90d + a7235ae commit 16f5df1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/views/crud/detail.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
{% set tab_id_option_name = constant('EasyCorp\\Bundle\\EasyAdminBundle\\Field\\FormField::OPTION_TAB_ID') %}
{% set tab_is_active_option_name = constant('EasyCorp\\Bundle\\EasyAdminBundle\\Field\\FormField::OPTION_TAB_IS_ACTIVE') %}

<div id="{{ field.getCustomOption(tab_id_option_name) }}" class="tab-pane {% if field.getCustomOption(tab_is_active_option_name) %}active{% endif %} {{ field.cssClass }}" {% for key, value in field.getFormTypeOption('attr') %}{{ key }}={{ value|e('html_attr') }}{% endfor %}>
<div id="{{ field.getCustomOption(tab_id_option_name) }}" class="tab-pane {% if field.getCustomOption(tab_is_active_option_name) %}active{% endif %} {{ field.cssClass }}" {% for key, value in field.getFormTypeOption('attr') %}{{ key }}="{{ value|e('html_attr') }}"{% endfor %}>
{% if field.help %}
<div class="content-header-help tab-help">
{{ field.help|trans(domain = ea.i18n.translationDomain)|raw }}
Expand Down

0 comments on commit 16f5df1

Please sign in to comment.