Archive deletion

Added archive deletion with a confirmation page
This commit is contained in:
Michael Rodin 2023-10-19 19:14:18 +02:00
parent f0b8b1eb3d
commit 82625c9d73
5 changed files with 439 additions and 41 deletions

View file

@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block meta %}
<link rel="stylesheet" href="/static/view.css" />
{% endblock %}
{% block content %}
<h2>{{archive[1]}}</h2>
<p>Are you sure?</p>
<form action="/delete/{{archive[0]}}" method="post">
<p><b>Enter Archive: </b><input type="text" name="archname" placeholder="Archive Name"></p>
<input type="submit" value="Yes, I am sure! Delete!">
</form>
{% endblock %}

View file

@ -5,7 +5,7 @@
{% endblock %}
{% block content %}
<h2>{{archive[1]}}</h2>
{% if login and userdata[0] == archive[8] %}<a href="/delete/{{archive[0]}}"><button class="big-button"><b>Delete</b></button></a>{% endif %}<h2>{{archive[1]}}</h2>
<div class="grid-container">
<div class="archive-info">
<b>Hash: </b><span>{{archive[2]}}</span>