moviewyrm/bookwyrm/templates/snippets/create_status/content_field.html
2021-09-08 13:58:10 -07:00

20 lines
1.1 KiB
HTML

{% 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"
class="textarea save-draft"
data-cache-draft="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
placeholder="{{ placeholder }}"
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
{% if not optional and type != "quotation" and type != "review" %}required{% endif %}
>{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{{ draft.content|default:'' }}</textarea>