Implement attachment removal

This commit is contained in:
Scot Hacker 2019-04-08 23:46:34 -07:00
parent 2e02163701
commit e7655ccfe8
5 changed files with 74 additions and 3 deletions

View file

@ -131,6 +131,7 @@
<th>Uploaded</th>
<th>By</th>
<th>Type</th>
<th>Remove</th>
</tr>
</thead>
<tbody>
@ -140,6 +141,12 @@
<td>{{ attachment.timestamp }}</td>
<td>{{ attachment.added_by.get_full_name }}</td>
<td>{{ attachment.extension.lower }}</td>
<td>
<form action="{% url "todo:remove_attachment" attachment.id %}" method="POST">
{% csrf_token %}
<input type="submit" value="X" class="btn btn-danger btn-sm">
</form>
</td>
</tr>
{% endfor %}
</tbody>