Add element IDs to dialog title and subtitle texts

This allows us to easily replace just the text based on a server response using TeleportController

Ideally, the {{ id }} should be a prefix instead of a postfix, but there's an existing title-{{ id }} for the h2 element so we follow it for now
pull/12185/head
Sage Abdullah 2024-07-09 09:49:47 +01:00 zatwierdzone przez Thibaud Colas
rodzic 43b9d18aa3
commit 3865be0cff
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -33,11 +33,11 @@
<h2 class="w-dialog__title w-h1" id="title-{{ id }}">
{% fragment as icon_classname %}{% classnames "w-dialog__icon" icon_classname %}{% endfragment %}
{% if icon_name %}{% icon name=icon_name classname=icon_classname %}{% endif %}
{{ title }}
<span id="title-text-{{ id }}">{{ title }}</span>
</h2>
{% if subtitle %}
<p class="w-dialog__subtitle w-help-text">{{ subtitle }}</p>
<p class="w-dialog__subtitle w-help-text" id="subtitle-{{ id }}">{{ subtitle }}</p>
{% endif %}
</div>