Skip to content

Commit

Permalink
bug #6648 Fix Fieldset collapse with new suffix. (WedgeSama)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.x branch.

Discussion
----------

Fix Fieldset collapse with new suffix.

Fix fieldset collapsing that do not use the right property to create the `id` HTML attribute.

#6555 (comment)

Commits
-------

4969c7e Fix Fieldset collapse with new suffix. #6555 (comment)
  • Loading branch information
javiereguiluz committed Dec 13, 2024
2 parents 150e6cb + 4969c7e commit a66ae73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/crud/detail.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@
{% endset %}

{% if is_collapsible %}
<a href="#content-{{ field.property }}" data-bs-toggle="collapse"
<a href="#content-{{ field.propertyNameWithSuffix }}" data-bs-toggle="collapse"
class="form-fieldset-title-content form-fieldset-collapse {{ is_collapsed ? 'collapsed' }}"
aria-expanded="{{ is_collapsed ? 'false' : 'true' }}" aria-controls="content-{{ field.property }}">
aria-expanded="{{ is_collapsed ? 'false' : 'true' }}" aria-controls="content-{{ field.propertyNameWithSuffix }}">
{{ fieldset_title_contents|raw }}
</a>
{% else %}
Expand All @@ -252,7 +252,7 @@
</div>
{% endif %}

<div id="content-{{ field.property }}" class="form-fieldset-body {{ not fieldset_has_header ? 'without-header' }} {{ is_collapsible ? 'collapse' }} {{ not is_collapsed ? 'show'}}">
<div id="content-{{ field.propertyNameWithSuffix }}" class="form-fieldset-body {{ not fieldset_has_header ? 'without-header' }} {{ is_collapsible ? 'collapse' }} {{ not is_collapsed ? 'show'}}">
<div class="row">
{% endmacro %}

Expand Down

0 comments on commit a66ae73

Please sign in to comment.