moviewyrm/bookwyrm/templates/snippets/progress_update.html

28 lines
1.4 KiB
HTML
Raw Normal View History

2021-01-20 07:04:08 +00:00
<form class="field is-grouped is-small" action="/edit-readthrough" method="POST">
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
<div class="field">
<label class="label is-align-self-center mb-0 pr-2" for="progress">Progress:</label>
<div class="field has-addons mb-0">
2021-01-20 07:04:08 +00:00
<div class="control">
<input
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
2021-01-22 17:21:58 +00:00
class="input is-small" type="number" min="0"
2021-01-20 07:04:08 +00:00
name="progress" size="3" value="{{ readthrough.progress|default:'' }}">
</div>
<div class="control select is-small">
<select name="progress_mode" aria-label="Progress mode">
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>pages</option>
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>percent</option>
</select>
</div>
2021-01-20 07:04:08 +00:00
<div class="control">
<button class="button is-small px-2 is-primary" type="submit">Save</button>
2021-01-20 07:04:08 +00:00
</div>
</div>
{% if readthrough.progress_mode == 'PG' and book.pages %}
<p class="help">of {{ book.pages }} pages</p>
{% endif %}
</div>
</form>