{% extends "components/modal.html" %} {% load i18n %} {% load utilities %} {% block modal-title %} {% if readthrough %} {% blocktrans trimmed with title=book|book_title %} Update read dates for "{{ title }}" {% endblocktrans %} {% else %} {% blocktrans trimmed with title=book|book_title %} Add read dates for "{{ title }}" {% endblocktrans %} {% endif %} {% endblock %} {% block modal-form-open %}
{% endblock %} {% block modal-body %} {% csrf_token %}
{% firstof form.start_date.value readthrough.start_date|date:"Y-m-d" as value %} {% include 'snippets/form_errors.html' with errors_list=form.start_date.errors id="desc_start_date" %}
{# Only show progress for editing existing readthroughs #} {% if readthrough.id and not readthrough.finish_date %} {% join "id_progress" readthrough.id as field_id %} {% include "snippets/progress_field.html" with id=field_id %} {% endif %}
{% firstof form.finish_date.value readthrough.finish_date|date:"Y-m-d" as value %} {% include 'snippets/form_errors.html' with errors_list=form.finish_date.errors id="desc_finish_date" %}
{% endblock %} {% block modal-footer %} {% endblock %} {% block modal-form-close %}
{% endblock %}