moviewyrm/bookwyrm/templates/snippets/create_status/content_warning_field.html

23 lines
745 B
HTML
Raw Normal View History

2021-02-28 02:48:10 +00:00
{% load i18n %}
2021-09-18 18:56:32 +00:00
<div
2021-09-18 23:27:13 +00:00
class="field{% if not reply_parent.content_warning and not draft.content_warning %} is-hidden{% endif %}"
2021-09-18 21:05:17 +00:00
id="spoilers_{{ uuid }}{{ local_uuid }}"
2021-09-18 18:56:32 +00:00
>
<label
class="label"
2021-09-18 21:05:17 +00:00
for="id_content_warning_{{ uuid }}{{ local_uuid }}"
2021-09-18 18:56:32 +00:00
>
{% trans "Content warning:" %}
</label>
2021-04-03 22:47:47 +00:00
<input
type="text"
name="content_warning"
maxlength="255"
class="input"
2021-09-18 21:05:17 +00:00
id="id_content_warning_{{ uuid }}{{ local_uuid }}"
2021-04-03 22:47:47 +00:00
placeholder="{% trans 'Spoilers ahead!' %}"
2021-09-18 23:27:13 +00:00
value="{% firstof draft.content_warning reply_parent.content_warning '' %}"
2021-10-14 23:53:46 +00:00
{% if not draft %}data-cache-draft="id_content_warning_{{ book.id }}_{{ type }}"{% endif %}
>
2020-12-17 19:05:37 +00:00
</div>