Merge pull request #1904 from bookwyrm-social/book-page-add-list

Fixes adding book to list from book page
This commit is contained in:
Mouse Reeve 2022-02-02 12:40:44 -08:00 committed by GitHub
commit f8bd0800f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,10 +356,11 @@
<form name="list-add" method="post" action="{% url 'list-add-book' %}"> <form name="list-add" method="post" action="{% url 'list-add-book' %}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"> <input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="user" value="{{ request.user.id }}">
<label class="label" for="id_list">{% trans "Add to list" %}</label> <label class="label" for="id_list">{% trans "Add to list" %}</label>
<div class="field has-addons"> <div class="field has-addons">
<div class="select control is-clipped"> <div class="select control is-clipped">
<select name="list" id="id_list"> <select name="book_list" id="id_list">
{% for list in user.list_set.all %} {% for list in user.list_set.all %}
<option value="{{ list.id }}">{{ list.name }}</option> <option value="{{ list.id }}">{{ list.name }}</option>
{% endfor %} {% endfor %}