diff --git a/bookwyrm/templates/edit_book.html b/bookwyrm/templates/edit_book.html index dc927e8a..a4d62efd 100644 --- a/bookwyrm/templates/edit_book.html +++ b/bookwyrm/templates/edit_book.html @@ -103,12 +103,14 @@

{% trans "Authors" %}

- {% for author in book.authors.all %} -

{{ author.name }} - - {% endfor %} +

+ {% for author in book.authors.all %} +

{{ author.name }} + + {% endfor %} +

{% if confirm_mode %} {% else %} diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index 0097eb9f..cc05a79c 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -163,6 +163,10 @@ class EditBook(View): data['confirm_mode'] = True return TemplateResponse(request, 'edit_book.html', data) + remove_authors = request.POST.getlist('remove_authors') + for author_id in remove_authors: + book.authors.remove(author_id) + book = form.save() return redirect('/book/%s' % book.id)