Handle edit and delete readthroughs
This commit is contained in:
@ -73,7 +73,7 @@
|
||||
</label>
|
||||
<form name="delete-readthrough-{{ readthrough.id }}" action="/delete-readthrough" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="readthrough" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<button class="button is-small" type="submit">
|
||||
<span class="icon icon-x">
|
||||
<span class="is-sr-only">Delete this readthrough</span>
|
||||
@ -90,18 +90,16 @@
|
||||
<form name="edit-readthrough" action="/edit-readthrough" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="id" value="{{ readthrough.id }}">
|
||||
<input type="hidden" name="user" value="{{ request.user.id }}">
|
||||
<input type="hidden" name="book" value="{{ readthrough.book.id }}">
|
||||
<div class="field">
|
||||
<label class="label" for="start_date-{{ readthrough.id }}">
|
||||
<label class="label" for="start_date">
|
||||
Started reading
|
||||
<input type="date" name="start_date-{{ readthrough.id }}" class="input" id="id_start_date-{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
|
||||
<input type="date" name="start_date" class="input" id="id_start_date-{{ readthrough.id }}" value="{{ readthrough.start_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="finish_date-{{ readthrough.id }}">
|
||||
<label class="label" for="finish_date">
|
||||
Finished reading
|
||||
<input type="date" name="finish_date-{{ readthrough.id }}" class="input" id="id_finish_date-{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
|
||||
<input type="date" name="finish_date" class="input" id="id_finish_date-{{ readthrough.id }}" value="{{ readthrough.finish_date | date:"Y-m-d" }}">
|
||||
</label>
|
||||
</div>
|
||||
<div class="field is-grouped">
|
||||
|
Reference in New Issue
Block a user