Add system reset button to admin dashboard with confirmation

This commit is contained in:
Troll (Hermes Agent) 2026-07-31 22:02:08 +00:00
parent 3db7d6449e
commit c532f1dc1c
3 changed files with 40 additions and 1 deletions

View file

@ -25,6 +25,10 @@ tr:hover{background:#2d3748}
.logout{float:right;color:#f87171;text-decoration:none}
.flash{padding:.8rem;background:#064e3b;border-radius:.5rem;margin-bottom:1rem}
.flash.error{background:#450a0a}
.reset-box{margin-top:2rem;padding:1rem;background:#450a0a;border:1px solid #7f1d1d;border-radius:.5rem}
.reset-box form{display:inline}
.reset-box button{background:#dc2626;color:#fff}
.reset-box button:hover{background:#b91c1c}
</style>
</head>
<body>
@ -78,6 +82,14 @@ tr:hover{background:#2d3748}
{% endif %}
</tbody>
</table>
<div class="reset-box">
<h2>⚠️ Reset System</h2>
<p>Use this once at the start of an event to clear all orders and uploaded files.</p>
<form method="POST" action="{{ url_for('admin_reset_system') }}" onsubmit="return confirm('ARE YOU SURE? This will delete ALL requests and ALL uploaded files. This cannot be undone.')">
<button type="submit">Reset System</button>
</form>
</div>
</div>
</body>
</html>