moviewyrm/bookwyrm/templates/snippets/readthrough_form.html

42 lines
1.5 KiB
HTML
Raw Normal View History

2021-02-28 02:48:10 +00:00
{% load i18n %}
2021-01-10 18:35:28 +00:00
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}">
<input type="hidden" name="book" value="{{ book.id }}">
2021-01-10 18:35:28 +00:00
<div class="field">
<label class="label">
2021-02-28 02:48:10 +00:00
{% trans "Started reading" %}
2021-05-04 16:04:21 +00:00
<duet-date-picker
identifier="id_start_date-{{ readthrough.id }}"
name="start_date"
value="{{ readthrough.start_date | date:'Y-m-d' }}">
</duet-date-picker>
2021-01-10 18:35:28 +00:00
</label>
</div>
{# Only show progress for editing existing readthroughs #}
{% if readthrough.id and not readthrough.finish_date %}
2021-01-22 21:00:20 +00:00
<label class="label" for="id_progress-{{ readthrough.id }}">
2021-02-28 02:48:10 +00:00
{% trans "Progress" %}
2021-01-22 21:00:20 +00:00
</label>
<div class="field has-addons">
<div class="control">
<input type="number" name="progress" class="input" id="id_progress-{{ readthrough.id }}" value="{{ readthrough.progress }}">
</div>
2021-01-22 21:00:20 +00:00
<div class="control select">
<select name="progress_mode" aria-label="Progress mode">
2021-02-28 02:48:10 +00:00
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>{% trans "pages" %}</option>
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>{% trans "percent" %}</option>
2021-01-22 21:00:20 +00:00
</select>
</div>
</div>
{% endif %}
2021-01-10 18:35:28 +00:00
<div class="field">
<label class="label">
2021-02-28 02:48:10 +00:00
{% trans "Finished reading" %}
2021-05-04 16:04:21 +00:00
<duet-date-picker
identifier="id_finish_date-{{ readthrough.id }}"
name="finish_date"
value="{{ readthrough.finish_date | date:'Y-m-d' }}">
</duet-date-picker>
2021-01-10 18:35:28 +00:00
</label>
</div>