From 549d6e9b3bce07b5286ab10cbe7a900f493344be Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 11 Jan 2022 13:10:25 -0800 Subject: [PATCH] Use updated modal triggers on shelf page shelf selector --- bookwyrm/templates/snippets/shelf_selector.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html index 97e9809d..323e04a2 100644 --- a/bookwyrm/templates/snippets/shelf_selector.html +++ b/bookwyrm/templates/snippets/shelf_selector.html @@ -38,20 +38,23 @@ {% trans "Start reading" as button_text %} {% url 'reading-status' 'start' book.id as fallback_url %} -{% include 'snippets/toggle/toggle_button.html' with class=button_class text=button_text controls_text="start_reading" controls_uid=uuid focus="modal_title_start_reading" disabled=is_current fallback_url=fallback_url %} +{% join "start_reading" uuid as modal_id %} +{% include 'snippets/shelve_button/modal_button.html' with class=button_class fallback_url=fallback_url %} {% elif shelf.identifier == 'read' %} {% trans "Read" as button_text %} {% url 'reading-status' 'finish' book.id as fallback_url %} -{% include 'snippets/toggle/toggle_button.html' with class=button_class text=button_text controls_text="finish_reading" controls_uid=uuid focus="modal_title_finish_reading" disabled=is_current fallback_url=fallback_url %} +{% join "finish_reading" uuid as modal_id %} +{% include 'snippets/shelve_button/modal_button.html' with class=button_class fallback_url=fallback_url %} {% elif shelf.identifier == 'to-read' %} {% trans "Want to read" as button_text %} {% url 'reading-status' 'want' book.id as fallback_url %} -{% include 'snippets/toggle/toggle_button.html' with class=button_class text=button_text controls_text="want_to_read" controls_uid=uuid focus="modal_title_want_to_read" disabled=is_current fallback_url=fallback_url %} +{% join "want_to_read" uuid as modal_id %} +{% include 'snippets/shelve_button/modal_button.html' with class=button_class fallback_url=fallback_url %} {% endif %} @@ -92,7 +95,7 @@ {% include 'snippets/reading_modals/start_reading_modal.html' with book=active_shelf.book id=modal_id move_from=current.id refresh=True class="" %} {% join "finish_reading" uuid as modal_id %} -{% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book id=modal_id move_from=current.id readthrough=readthrough refresh=True class="" %} +{% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book id=modal_id move_from=current.id readthrough=readthrough refresh=True class="" %} {% endwith %} {% endblock %}