From 8325fbd77220c3a179fad49abf7d6495eed05c49 Mon Sep 17 00:00:00 2001 From: Jascha Urbach Date: Sat, 10 Dec 2022 10:50:25 +0100 Subject: [PATCH] goodreads_key for books editable The field goodreads_key is now editable. ID shows in ID section of book. --- bookwyrm/forms/books.py | 3 +++ bookwyrm/templates/book/book_identifiers.html | 6 ++++++ bookwyrm/templates/book/edit/edit_book_form.html | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/bookwyrm/forms/books.py b/bookwyrm/forms/books.py index 9b3c84010..20c75d011 100644 --- a/bookwyrm/forms/books.py +++ b/bookwyrm/forms/books.py @@ -73,6 +73,9 @@ class EditionForm(CustomForm): "inventaire_id": forms.TextInput( attrs={"aria-describedby": "desc_inventaire_id"} ), + "goodreads_key": forms.TextInput( + attrs={"aria-describedby": "desc_goodreads_key"} + ), "oclc_number": forms.TextInput( attrs={"aria-describedby": "desc_oclc_number"} ), diff --git a/bookwyrm/templates/book/book_identifiers.html b/bookwyrm/templates/book/book_identifiers.html index 19ab619da..431c3075f 100644 --- a/bookwyrm/templates/book/book_identifiers.html +++ b/bookwyrm/templates/book/book_identifiers.html @@ -23,6 +23,12 @@
{{ book.asin }}
{% endif %} + {% if book.goodreads_key %} +
+
{% trans "Goodreads:" %}
+
{{ book.goodreads_key }}
+
+ {% endif %} {% endif %} {% endspaceless %} diff --git a/bookwyrm/templates/book/edit/edit_book_form.html b/bookwyrm/templates/book/edit/edit_book_form.html index ff77443e7..b98e32182 100644 --- a/bookwyrm/templates/book/edit/edit_book_form.html +++ b/bookwyrm/templates/book/edit/edit_book_form.html @@ -327,6 +327,15 @@ {% include 'snippets/form_errors.html' with errors_list=form.inventaire_id.errors id="desc_inventaire_id" %} +
+ + {{ form.goodreads_key }} + + {% include 'snippets/form_errors.html' with errors_list=form.goodreads_key.errors id="desc_goodreads_key" %} +
+