Progress update flow for modal
This commit is contained in:
@ -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 %}
|
||||
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
{% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %}
|
||||
|
||||
{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %}
|
||||
{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %}
|
||||
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user