mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-24 00:50:35 +00:00
Merge pull request #2042 from bookwyrm-social/progress-updates
Fixes progress updates
This commit is contained in:
commit
db5f509475
3 changed files with 10 additions and 2 deletions
|
@ -45,7 +45,7 @@ class ReportForm(CustomForm):
|
||||||
|
|
||||||
class ReadThroughForm(CustomForm):
|
class ReadThroughForm(CustomForm):
|
||||||
def clean(self):
|
def clean(self):
|
||||||
"""make sure the email isn't in use by a registered user"""
|
"""don't let readthroughs end before they start"""
|
||||||
cleaned_data = super().clean()
|
cleaned_data = super().clean()
|
||||||
start_date = cleaned_data.get("start_date")
|
start_date = cleaned_data.get("start_date")
|
||||||
finish_date = cleaned_data.get("finish_date")
|
finish_date = cleaned_data.get("finish_date")
|
||||||
|
|
|
@ -17,7 +17,14 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-form-open %}
|
{% block modal-form-open %}
|
||||||
<form name="add-readthrough-{{ readthrough.id }}" action="/create-readthrough" method="post">
|
<form
|
||||||
|
name="add-readthrough-{{ readthrough.id }}"
|
||||||
|
{% if readthrough.id %}
|
||||||
|
action="{% url 'edit-readthrough' %}"
|
||||||
|
{% else %}
|
||||||
|
action="{% url 'create-readthrough' %}"
|
||||||
|
{% endif %}
|
||||||
|
method="POST">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block modal-body %}
|
{% block modal-body %}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<form name="reading-progress-{{ uuid }}" action="{% url 'reading-status-update' book.id %}" method="POST" class="submit-status">
|
<form name="reading-progress-{{ uuid }}" action="{% url 'reading-status-update' book.id %}" method="POST" class="submit-status">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||||
|
<input type="hidden" name="start_date" value="{{ readthrough.start_date|date:'Y-m-d' }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block reading-dates %}
|
{% block reading-dates %}
|
||||||
|
|
Loading…
Reference in a new issue