From 82ea04f247804fea25498a524447ecf0bcbecfb4 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 30 Dec 2021 13:37:07 -0800 Subject: [PATCH] Uses new modals for author sync --- bookwyrm/templates/author/author.html | 9 +++++---- bookwyrm/templates/author/sync_modal.html | 7 ++++--- bookwyrm/templates/components/new_modal.html | 4 +++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 66ecb062..58e54524 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -92,10 +92,11 @@ {% trans "View on OpenLibrary" %} {% if request.user.is_authenticated and perms.bookwyrm.edit_book %} - {% with controls_text="ol_sync" controls_uid=author.id %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text focus="modal_title_ol_sync" class="is-small" icon_with_text="download" %} - {% include "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" %} - {% endwith %} + + {% include "author/sync_modal.html" with source="openlibrary.org" source_name="OpenLibrary" id="openlibrary_sync" %} {% endif %} {% endif %} diff --git a/bookwyrm/templates/author/sync_modal.html b/bookwyrm/templates/author/sync_modal.html index a061ada8..5d2ff347 100644 --- a/bookwyrm/templates/author/sync_modal.html +++ b/bookwyrm/templates/author/sync_modal.html @@ -1,4 +1,4 @@ -{% extends 'components/modal.html' %} +{% extends 'components/new_modal.html' %} {% load i18n %} {% block modal-title %} @@ -23,8 +23,9 @@ {% trans "Confirm" %} -{% trans "Cancel" as button_text %} -{% include 'snippets/toggle/toggle_button.html' with text=button_text %} + {% endblock %} {% block modal-form-close %}{% endblock %} diff --git a/bookwyrm/templates/components/new_modal.html b/bookwyrm/templates/components/new_modal.html index c4927e52..8bb3cc58 100644 --- a/bookwyrm/templates/components/new_modal.html +++ b/bookwyrm/templates/components/new_modal.html @@ -2,7 +2,7 @@