Skip to content

Commit da0c92d

Browse files
committed
lower all ids and id global prefix
1 parent e571cda commit da0c92d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
{% trans_default_domain 'content_edit' %}
66

7+
{% set target_id_prefix = target_id_prefix|default('ibexa-edit-content-sections-content-fields-') %}
78
{% set grouped_fields = grouped_fields|default([]) %}
89
{% set anchor_params = { items: grouped_fields|keys|map((label) => {
910
label,
10-
target_id: 'ibexa-edit-content-sections-content-fields-' ~ label|lower|slug }
11+
target_id: target_id_prefix ~ label|lower|slug }
1112
) } %}
1213
{% set is_autosave_enabled = ibexa_user_settings['autosave'] is same as('enabled') %}
1314
{% set form_has_autosave = form.autosave is defined %}
@@ -46,7 +47,7 @@
4647
{% if grouped_fields|length > 1 %}
4748
{% for key, group in grouped_fields %}
4849
{% embed '@ibexadesign/ui/anchor_navigation_section.html.twig' with {
49-
anchor_section_key: 'ibexa-edit-content-sections-content-fields-' ~ key|lower,
50+
anchor_section_key: target_id_prefix ~ key,
5051
} %}
5152
{% trans_default_domain 'content_edit' %}
5253
{% import '@ibexadesign/content/edit_macros.html.twig' as edit_macros %}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<ul class="ibexa-anchor-navigation-menu__sections ibexa-anchor-navigation-menu__sections--active">
2222
{% for item in items %}
2323
{% set item_label = item is iterable ? item.label : item %}
24-
{% set sanitized_item = item is iterable and item.target_id is defined ? item.target_id : item_label|slug %}
24+
{% set sanitized_item = item is iterable and item.target_id is defined ? item.target_id : item_label|lower|slug %}
2525

2626
<li class="ibexa-anchor-navigation-menu__sections-item">
2727
<button

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div
2-
data-id="#{{ anchor_section_key|slug }}"
2+
data-id="#{{ anchor_section_key|lower|slug }}"
33
class="ibexa-anchor-navigation__section {{ anchor_section_class|default('') }}"
44
>
55
{% block anchor_section_content %}

0 commit comments

Comments
 (0)