2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2022-01-04 20:53:48 +00:00
|
|
|
{% load utilities %}
|
|
|
|
|
2021-01-10 18:35:28 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
2021-01-10 18:51:56 +00:00
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
2022-01-11 17:50:04 +00:00
|
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
2021-01-10 18:35:28 +00:00
|
|
|
<div class="field">
|
2021-08-09 01:40:47 +00:00
|
|
|
<label class="label" tabindex="0" id="add_readthrough_focus_{{ readthrough.id }}" for="id_start_date_{{ readthrough.id }}">
|
2021-02-28 02:48:10 +00:00
|
|
|
{% trans "Started reading" %}
|
2021-01-10 18:35:28 +00:00
|
|
|
</label>
|
2021-08-09 01:40:47 +00:00
|
|
|
<input type="date" name="start_date" class="input" id="id_start_date_{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
|
2021-01-10 18:35:28 +00:00
|
|
|
</div>
|
2021-01-17 10:28:37 +00:00
|
|
|
{# Only show progress for editing existing readthroughs #}
|
|
|
|
{% if readthrough.id and not readthrough.finish_date %}
|
2022-01-04 20:53:48 +00:00
|
|
|
{% join "id_progress" readthrough.id as field_id %}
|
|
|
|
<label class="label" for="{{ field_id }}">
|
2021-02-28 02:48:10 +00:00
|
|
|
{% trans "Progress" %}
|
2021-01-22 21:00:20 +00:00
|
|
|
</label>
|
2022-01-04 20:53:48 +00:00
|
|
|
{% include "snippets/progress_field.html" with id=field_id %}
|
2021-01-17 10:28:37 +00:00
|
|
|
{% endif %}
|
2022-05-26 18:53:33 +00:00
|
|
|
|
2021-01-10 18:35:28 +00:00
|
|
|
<div class="field">
|
2021-08-09 01:40:47 +00:00
|
|
|
<label class="label" for="id_finish_date_{{ readthrough.id }}">
|
2021-02-28 02:48:10 +00:00
|
|
|
{% trans "Finished reading" %}
|
2021-01-10 18:35:28 +00:00
|
|
|
</label>
|
2021-08-09 01:40:47 +00:00
|
|
|
<input type="date" name="finish_date" class="input" id="id_finish_date_{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
|
2021-01-10 18:35:28 +00:00
|
|
|
</div>
|