kopia lustrzana https://github.com/wagtail/wagtail
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 nowpull/12185/head
rodzic
43b9d18aa3
commit
3865be0cff
|
@ -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>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue