Progress update flow for modal

This commit is contained in:
Mouse Reeve
2021-09-29 10:59:36 -07:00
parent 4dbb09be87
commit d78c278665
10 changed files with 35 additions and 9 deletions

View File

@ -11,6 +11,7 @@ Finish "<em>{{ book_title }}</em>"
{% block modal-form-open %}
<form name="finish-reading" action="{% url 'reading-status' 'finish' book.id %}" method="post" class="submit-status">
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}">
<input type="hidden" name="reading_status" value="read">
{% endblock %}

View File

@ -5,12 +5,13 @@
{% block content_label %}
{% trans "Comment:" %}
{% if optional %}
<span class="help mt-0 has-text-weight-normal">{% trans "(Optional)" %}</span>
{% endif %}
{% endblock %}
{% block initial_fields %}
<input type="hidden" name="user" value="{{ request.user.id }}">
<input type="hidden" name="mention_books" value="{{ book.id }}">
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="id" value="{{ readthrough.id }}">
{% endblock %}

View File

@ -13,14 +13,18 @@
{% trans "Post to feed" %}
</label>
<div class="is-hidden" id="hide_reading_content_{{ local_uuid }}_{{ uuid }}">
<button class="button is-link" type="submit">{% trans "Save" %}</button>
<button class="button is-link" type="submit">
<span class="icon icon-spinner" aria-hidden="true"></span>
<span>{% trans "Save" %}</span>
</button>
</div>
</div>
<div id="reading_content_{{ local_uuid }}_{{ uuid }}">
<hr aria-hidden="true">
<fieldset id="reading_content_fieldset_{{ local_uuid }}_{{ uuid }}">
{% include "snippets/reading_modals/form.html" with optional=True %}
{% comparison_bool controls_text "progress_update" True as optional %}
{% include "snippets/reading_modals/form.html" with optional=optional %}
</fieldset>
</div>
{% endwith %}

View File

@ -6,8 +6,9 @@
{% endblock %}
{% block modal-form-open %}
<form action="{% url 'edit-readthrough' %}" method="POST" class="submit-status">
<form name="reading-progress" action="{% url 'reading-status-update' book.id %}" method="POST" class="submit-status">
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}">
{% endblock %}
{% block reading-dates %}