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

21 lines
1.1 KiB
HTML
Raw Normal View History

{% load i18n %}
{% load status_display %}
{% load utilities %}
{% comment %}
type: used to differentiate html id fields when multiple types of posting are available for a book (options: comment, quotation, review, direct, reply)
book: the Edition object related to the status
reply_parent: if applicable, the Status object that this post is in reply to
mention: a user who is @ mentioned by default in the post
draft: an existing Status object that is providing default values for input fields
{% endcomment %}
<textarea
name="content"
2021-09-08 20:58:10 +00:00
class="textarea save-draft"
2021-10-14 23:53:46 +00:00
{% if not draft %}data-cache-draft="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"{% endif %}
2021-09-29 22:35:08 +00:00
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}{{ uuid }}"
placeholder="{{ placeholder }}"
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
{% if not optional and type != "quotation" and type != "review" %}required{% endif %}
2021-10-15 01:34:26 +00:00
>{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{% firstof draft.raw_content draft.content '' %}</textarea>