Make comment optional

This commit is contained in:
Mouse Reeve 2021-08-16 12:47:12 -07:00
parent 011175a6e3
commit 0549dbaa6d
4 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,6 @@ draft: an existing Status object that is providing default values for input fiel
id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}" id="id_content_{{ type }}_{{ book.id }}{{ reply_parent.id }}"
placeholder="{{ placeholder }}" placeholder="{{ placeholder }}"
aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}" aria-label="{% if reply_parent %}{% trans 'Reply' %}{% else %}{% trans 'Content' %}{% endif %}"
{% if type != "quotation" %}required{% endif %} {% if not optional and type != "quotation" %}required{% endif %}
>{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{{ draft.content|default:'' }}</textarea> >{% if reply_parent %}{{ reply_parent|mentions:request.user }}{% endif %}{% if mention %}@{{ mention|username }} {% endif %}{{ draft.content|default:'' }}</textarea>

View file

@ -10,6 +10,7 @@ Finish "<em>{{ book_title }}</em>"
{% block modal-form-open %} {% block modal-form-open %}
<form name="finish-reading" action="{% url 'reading-status' 'finish' book.id %}" method="post"> <form name="finish-reading" action="{% url 'reading-status' 'finish' book.id %}" method="post">
{% csrf_token %}
{% endblock %} {% endblock %}
{% block reading-dates %} {% block reading-dates %}

View file

@ -20,7 +20,7 @@
<div id="reading_content_{{ local_uuid }}_{{ uuid }}"> <div id="reading_content_{{ local_uuid }}_{{ uuid }}">
<hr aria-hidden="true"> <hr aria-hidden="true">
<fieldset id="reading_content_fieldset_{{ local_uuid }}_{{ uuid }}"> <fieldset id="reading_content_fieldset_{{ local_uuid }}_{{ uuid }}">
{% include "snippets/reading_modals/form.html" %} {% include "snippets/reading_modals/form.html" with optional=True %}
</fieldset> </fieldset>
</div> </div>
{% endwith %} {% endwith %}

View file

@ -10,6 +10,7 @@ Start "<em>{{ book_title }}</em>"
{% block modal-form-open %} {% block modal-form-open %}
<form name="start-reading" action="{% url 'reading-status' 'start' book.id %}" method="post"> <form name="start-reading" action="{% url 'reading-status' 'start' book.id %}" method="post">
{% csrf_token %}
{% endblock %} {% endblock %}
{% block reading-dates %} {% block reading-dates %}