forked from mirrors/bookwyrm
Changes how progress input fields are id'ed
This commit is contained in:
parent
49ecd86afe
commit
10a51d9689
4 changed files with 11 additions and 6 deletions
|
@ -5,7 +5,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
name="progress"
|
name="progress"
|
||||||
class="input"
|
class="input"
|
||||||
id="id_progress_{{ readthrough.id }}{{ controls_uid }}"
|
id="{{ field_id }}"
|
||||||
value="{{ readthrough.progress }}"
|
value="{{ readthrough.progress }}"
|
||||||
{% if progress_required %}required{% endif %}
|
{% if progress_required %}required{% endif %}
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{% extends 'snippets/reading_modals/layout.html' %}
|
{% extends 'snippets/reading_modals/layout.html' %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load utilities %}
|
||||||
|
|
||||||
{% block modal-title %}
|
{% block modal-title %}
|
||||||
{% trans "Update progress" %}
|
{% trans "Update progress" %}
|
||||||
|
@ -12,8 +13,9 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block reading-dates %}
|
{% block reading-dates %}
|
||||||
<label for="id_progress_{{ readthrough.id }}{{ controls_uid }}" class="label">{% trans "Progress:" %}</label>
|
{% join "id_progress" uuid as field_id %}
|
||||||
{% include "snippets/progress_field.html" with progress_required=True %}
|
<label for="{{ field_id }}" class="label">{% trans "Progress:" %}</label>
|
||||||
|
{% include "snippets/progress_field.html" with progress_required=True id=field_id %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block form %}
|
{% block form %}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load utilities %}
|
||||||
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||||
<input type="hidden" name="book" value="{{ book.id }}">
|
<input type="hidden" name="book" value="{{ book.id }}">
|
||||||
|
@ -10,10 +12,11 @@
|
||||||
</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 %}
|
||||||
<label class="label" for="id_progress_{{ readthrough.id }}{{ controls_uid }}">
|
{% join "id_progress" readthrough.id as field_id %}
|
||||||
|
<label class="label" for="{{ field_id }}">
|
||||||
{% trans "Progress" %}
|
{% trans "Progress" %}
|
||||||
</label>
|
</label>
|
||||||
{% include "snippets/progress_field.html" %}
|
{% include "snippets/progress_field.html" with id=field_id %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label" for="id_finish_date_{{ readthrough.id }}">
|
<label class="label" for="id_finish_date_{{ readthrough.id }}">
|
||||||
|
|
Loading…
Reference in a new issue