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

23 lines
718 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
class="field{% if not parent_status.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!' %}"
value="{% firstof draft.content_warning parent_status.content_warning '' %}"
data-cache-draft="id_content_warning_{{ book.id }}_{{ type }}"
>
2020-12-17 19:05:37 +00:00
</div>