Fixes content warning fields in modals

This commit is contained in:
Mouse Reeve
2021-09-18 14:05:17 -07:00
parent e39136c34d
commit 19e36eb181
2 changed files with 6 additions and 5 deletions

View File

@ -1,11 +1,11 @@
{% load i18n %}
<div
class="field{% if not parent_status.content_warning and not draft.content_warning %} is-hidden{% endif %}"
id="spoilers_{{ uuid }}"
id="spoilers_{{ uuid }}{{ local_uuid }}"
>
<label
class="label"
for="id_content_warning_{{ uuid }}"
for="id_content_warning_{{ uuid }}{{ local_uuid }}"
>
{% trans "Content warning:" %}
</label>
@ -14,7 +14,7 @@
name="content_warning"
maxlength="255"
class="input"
id="id_content_warning_{{ uuid }}"
id="id_content_warning_{{ uuid }}{{ local_uuid }}"
placeholder="{% trans 'Spoilers ahead!' %}"
value="{% firstof draft.content_warning parent_status.content_warning '' %}"
data-cache-draft="id_content_warning_{{ book.id }}_{{ type }}"