From 99904618accd8f9c2eec84e5167414cf00bf19ed Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 5 Sep 2021 15:24:09 -0700 Subject: [PATCH] Fixes close buttons on modals --- bookwyrm/templates/components/modal.html | 12 ++++++++++-- bookwyrm/templates/reading_progress/finish.html | 2 +- bookwyrm/templates/reading_progress/start.html | 2 +- bookwyrm/templates/reading_progress/want.html | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bookwyrm/templates/components/modal.html b/bookwyrm/templates/components/modal.html index d8c1a468..2eabd2e2 100644 --- a/bookwyrm/templates/components/modal.html +++ b/bookwyrm/templates/components/modal.html @@ -14,7 +14,11 @@ - {% include 'snippets/toggle/toggle_button.html' with label=label class="delete" nonbutton=True %} + {% if static %} + {{ label }} + {% else %} + {% include 'snippets/toggle/toggle_button.html' with label=label class="delete" nonbutton=True %} + {% endif %} {% block modal-form-open %}{% endblock %} {% if not no_body %} @@ -27,6 +31,10 @@ {% block modal-form-close %}{% endblock %} - {% include 'snippets/toggle/toggle_button.html' with label=label class="modal-close is-large" nonbutton=True %} + {% if static %} + {{ label }} + {% else %} + {% include 'snippets/toggle/toggle_button.html' with label=label class="modal-close is-large" nonbutton=True %} + {% endif %} diff --git a/bookwyrm/templates/reading_progress/finish.html b/bookwyrm/templates/reading_progress/finish.html index ca69128e..501fb3c4 100644 --- a/bookwyrm/templates/reading_progress/finish.html +++ b/bookwyrm/templates/reading_progress/finish.html @@ -9,6 +9,6 @@ Finish "{{ book_title }}" {% block content %} -{% include "snippets/reading_modals/finish_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/finish_reading_modal.html" with book=book active=True static=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/start.html b/bookwyrm/templates/reading_progress/start.html index e24a0e05..df8f698a 100644 --- a/bookwyrm/templates/reading_progress/start.html +++ b/bookwyrm/templates/reading_progress/start.html @@ -9,6 +9,6 @@ Start "{{ book_title }}" {% block content %} -{% include "snippets/reading_modals/start_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/start_reading_modal.html" with book=book active=True static=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/want.html b/bookwyrm/templates/reading_progress/want.html index 6122ade3..31f047cf 100644 --- a/bookwyrm/templates/reading_progress/want.html +++ b/bookwyrm/templates/reading_progress/want.html @@ -9,6 +9,6 @@ Want to Read "{{ book_title }}" {% block content %} -{% include "snippets/reading_modals/want_to_read_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/want_to_read_modal.html" with book=book active=True static=True %} {% endblock %}