Consistent progress type form element

This commit is contained in:
Mouse Reeve 2021-01-22 13:00:20 -08:00
parent 12c23836b7
commit 129ca0352f

View file

@ -9,26 +9,18 @@
</div> </div>
{# Only show progress for editing existing readthroughs #} {# Only show progress for editing existing readthroughs #}
{% if readthrough.id and not readthrough.finish_date %} {% if readthrough.id and not readthrough.finish_date %}
<div class="columns"> <label class="label" for="id_progress-{{ readthrough.id }}">
<div class="column"> Progress
<div class="field"> </label>
<label class="label"> <div class="field has-addons">
Progress <div class="control">
<input type="number" name="progress" class="input" id="id_progress-{{ readthrough.id }}" value="{{ readthrough.progress }}"> <input type="number" name="progress" class="input" id="id_progress-{{ readthrough.id }}" value="{{ readthrough.progress }}">
</label>
</div>
</div> </div>
<div class="column"> <div class="control select">
<div class="control mt-5"> <select name="progress_mode" aria-label="Progress mode">
<label class="radio"> <option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>pages</option>
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PG" {% if readthrough.progress_mode == 'PG' %}checked{% endif %}> <option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>percent</option>
pages </select>
</label>
<label class="radio">
<input type="radio" name="progress_mode" id="id_progress_mode-{{ readthrough.id }}" value="PCT" {% if readthrough.progress_mode == 'PCT' %}checked{% endif %}>
percent
</label>
</div>
</div> </div>
</div> </div>
{% endif %} {% endif %}