mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Add hidden "next" input set to current path
This commit is contained in:
parent
6947e74f5d
commit
3f52d6ee33
9 changed files with 15 additions and 4 deletions
|
@ -14,6 +14,7 @@ Finish "<em>{{ book_title }}</em>"
|
|||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="reading_status" value="read">
|
||||
<input type="hidden" name="shelf" value="{{ move_from }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block reading-dates %}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="start_date" value="{{ readthrough.start_date|date:'Y-m-d' }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block reading-dates %}
|
||||
|
|
|
@ -10,9 +10,10 @@ Start "<em>{{ book_title }}</em>"
|
|||
|
||||
{% block modal-form-open %}
|
||||
<form name="start-reading-{{ uuid }}" action="{% url 'reading-status' 'start' book.id %}" method="post" {% if not refresh %}class="submit-status"{% endif %}>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="reading_status" value="reading">
|
||||
<input type="hidden" name="shelf" value="{{ move_from }}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block reading-dates %}
|
||||
|
|
|
@ -14,6 +14,7 @@ Stop Reading "<em>{{ book_title }}</em>"
|
|||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="reading_status" value="stopped-reading">
|
||||
<input type="hidden" name="shelf" value="{{ move_from }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block reading-dates %}
|
||||
|
|
|
@ -10,9 +10,10 @@ Want to Read "<em>{{ book_title }}</em>"
|
|||
|
||||
{% block modal-form-open %}
|
||||
<form name="want-to-read-{{ uuid }}" action="{% url 'reading-status' 'want' book.id %}" method="post" {% if not refresh %}class="submit-status"{% endif %}>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="reading_status" value="to-read">
|
||||
<input type="hidden" name="shelf" value="{{ move_from }}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
{% endblock %}
|
||||
|
||||
{% block form %}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="change-shelf-from" value="{{ current.identifier }}">
|
||||
<input type="hidden" name="shelf" value="{{ shelf.identifier }}">
|
||||
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button class="button is-fullwidth is-small shelf-option is-radiusless has-background-body" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}>
|
||||
<span>
|
||||
{% include "snippets/translated_shelf_name.html" with shelf=shelf %}
|
||||
|
@ -78,6 +78,7 @@
|
|||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="shelf" value="{{ user_shelf.id }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">
|
||||
{% blocktrans with name=user_shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
|
||||
</button>
|
||||
|
@ -92,6 +93,7 @@
|
|||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="shelf" value="{{ shelf.id }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">{% trans "Remove from" %} {{ shelf.name }}</button>
|
||||
</form>
|
||||
</li>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% load utilities %}
|
||||
<form name="fallback_form_{{ 0|uuid }}" method="GET" action="{{ fallback_url }}" autocomplete="off">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button
|
||||
type="submit"
|
||||
class="button {{ class }}"
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
<form name="shelve-{{ uuid }}-{{ shelf.identifier }}" action="/shelve/" method="post" autocomplete="off">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button class="button {{ class }}" name="shelf" type="submit" value="{{ shelf.identifier }}" {% if book|is_book_on_shelf:shelf %} disabled {% endif %}>
|
||||
<span>{{ shelf.name }}</span>
|
||||
</button>
|
||||
|
@ -69,6 +70,7 @@
|
|||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<input type="hidden" name="shelf" value="{{ active_shelf.shelf.id }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button class="button is-fullwidth is-small{% if dropdown %} is-radiusless{% endif %} is-danger is-light" type="submit">
|
||||
{% blocktrans with name=active_shelf.shelf|translate_shelf_name %}Remove from {{ name }}{% endblocktrans %}
|
||||
</button>
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
<form name="shelve-{{ uuid }}-{{ shelf.identifier }}" action="/shelve/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
<button
|
||||
class="button {{ class }}"
|
||||
name="shelf"
|
||||
|
|
Loading…
Reference in a new issue