Merge pull request #338 from mouse-reeve/code-cleanup

Code cleanup
This commit is contained in:
Mouse Reeve
2020-11-10 22:29:30 -08:00
committed by GitHub
14 changed files with 55 additions and 94 deletions

View File

@ -9,10 +9,9 @@
<label class="delete" for="finish-reading-{{ uuid }}" aria-label="close" role="button"></label>
</header>
{% active_read_through book user as readthrough %}
<form name="finish-reading" action="/finish-reading" method="post">
<form name="finish-reading" action="/finish-reading/{{ book.id }}" method="post">
<section class="modal-card-body">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="id" value="{{ readthrough.id }}">
<div class="field">
<label class="label">

View File

@ -1,11 +1,11 @@
{% load fr_display %}
{% if request.user|follow_request_exists:user %}
<form action="/accept_follow_request/" method="POST">
<form action="/accept-follow-request/" method="POST">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}">
<button class="button is-primary is-small" type="submit">Accept</button>
</form>
<form action="/delete_follow_request/" method="POST">
<form action="/delete-follow-request/" method="POST">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}">
<button class="button is-danger is-light is-small" type="submit" class="warning">Delete</button>

View File

@ -7,10 +7,9 @@
<p class="modal-card-title">Start "{{ book.title }}"</p>
<label class="delete" for="start-reading-{{ uuid }}" aria-label="close" role="button" tabindex="0"></label>
</header>
<form name="start-reading" action="/start-reading" method="post">
<form name="start-reading" action="/start-reading/{{ book.id }}" method="post">
<section class="modal-card-body">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<div class="field">
<label class="label">
Started reading

View File

@ -82,9 +82,8 @@
<div class="toggle-content hidden card-footer">
{% if status.user == request.user %}
<div class="card-footer-item">
<form name="delete-{{status.id}}" action="/delete-status" method="post">
<form name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
{% csrf_token %}
<input type="hidden" name="status" value="{{ status.id }}">
<button class="button is-danger is-light" type="submit">
Delete post
</button>