2021-08-09 01:40:47 +00:00
{% load i18n %}
{% load utilities %}
{% load status_display %}
{% comment %}
----- Variables
book: the Edition object this status is related to. Required unless the status is a reply
draft: the content of an existing Status object to be edited (used in delete and redraft)
uuid: a unique identifier used to make html "id" attributes unique and clarify javascript controls
type: used for uniquely identifying the html elements when mutliple types of posts are available for a book, and usually the endpoint name that the form posts to
reply_parent: the Status object this post will be in reply to, if applicable
{% endcomment %}
{% block form_open %}
{# default form tag syntax, can be overriddden #}
2021-09-18 21:56:20 +00:00
< form
class="is-flex-grow-1{% if not no_script %} submit-status{% endif %}"
name="{{ type }}"
2021-10-15 00:23:54 +00:00
{% if draft %}
action="{% url 'create-status' type draft.id %}"
{% else %}
action="{% url 'create-status' type %}"
{% endif %}
2021-09-18 21:56:20 +00:00
method="post"
2021-09-29 22:35:08 +00:00
id="form_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
2021-09-18 21:56:20 +00:00
>
2021-08-09 01:40:47 +00:00
{% endblock %}
{% csrf_token %}
{% block initial_fields %}
< input type = "hidden" name = "book" value = "{{ book.id }}" >
< input type = "hidden" name = "user" value = "{{ request.user.id }}" >
< input type = "hidden" name = "reply_parent" value = "{% firstof draft.reply_parent.id reply_parent.id %}" >
2021-10-15 21:41:14 +00:00
{% if draft %}
< input type = "hidden" name = "reading_status" value = "{{ draft.reading_status|default:'' }}" >
{% endif %}
2021-08-09 01:40:47 +00:00
{% endblock %}
2021-09-18 18:56:32 +00:00
{# fields that go between the content warnings and the content field (ie, quote) #}
{% block pre_content_additions %}{% endblock %}
2021-09-29 22:35:08 +00:00
< label class = "label" for = "id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}{{ uuid }}" >
2021-09-18 18:56:32 +00:00
{% block content_label %}
{% trans "Comment:" %}
{% endblock %}
< / label >
2021-08-09 01:40:47 +00:00
< div class = "field" >
2021-09-18 18:56:32 +00:00
{% include "snippets/create_status/content_field.html" with placeholder=placeholder %}
2021-08-09 01:40:47 +00:00
< / div >
{# additional fields that go after the content block (ie, progress) #}
{% block post_content_additions %}{% endblock %}
2022-03-10 17:03:24 +00:00
{% include "snippets/create_status/content_warning_field.html" %}
2021-08-09 01:40:47 +00:00
{% block options_block %}
{# cw, post privacy, and submit button #}
{% include "snippets/create_status/post_options_block.html" %}
{% endblock %}
{% block form_close %}
< / form >
{% endblock %}