From 0549dbaa6dbce0f3252ea27ae2ec68f6934fef4b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 16 Aug 2021 12:47:12 -0700 Subject: [PATCH] Make comment optional --- bookwyrm/templates/snippets/create_status/content_field.html | 2 +- .../templates/snippets/reading_modals/finish_reading_modal.html | 1 + bookwyrm/templates/snippets/reading_modals/layout.html | 2 +- .../templates/snippets/reading_modals/start_reading_modal.html | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/create_status/content_field.html b/bookwyrm/templates/snippets/create_status/content_field.html index 0a42a8327..903372003 100644 --- a/bookwyrm/templates/snippets/create_status/content_field.html +++ b/bookwyrm/templates/snippets/create_status/content_field.html @@ -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 }}" placeholder="{{ placeholder }}" 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:'' }} diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html index fdb5d7bb2..84e762c59 100644 --- a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -10,6 +10,7 @@ Finish "{{ book_title }}" {% block modal-form-open %}
+{% csrf_token %} {% endblock %} {% block reading-dates %} diff --git a/bookwyrm/templates/snippets/reading_modals/layout.html b/bookwyrm/templates/snippets/reading_modals/layout.html index 5190ada49..00e453350 100644 --- a/bookwyrm/templates/snippets/reading_modals/layout.html +++ b/bookwyrm/templates/snippets/reading_modals/layout.html @@ -20,7 +20,7 @@
- {% include "snippets/reading_modals/form.html" %} + {% include "snippets/reading_modals/form.html" with optional=True %}
{% endwith %} diff --git a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html index 08191c798..6b04a32e5 100644 --- a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html +++ b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html @@ -10,6 +10,7 @@ Start "{{ book_title }}" {% block modal-form-open %} +{% csrf_token %} {% endblock %} {% block reading-dates %}