238 lines
7 KiB
HTML
238 lines
7 KiB
HTML
{% if session['theme'] == 'darkmode' %}
|
|
{% extends "base_dark.html" %}
|
|
{% else %}
|
|
{% extends "base.html" %}
|
|
{% endif %}
|
|
|
|
{% block title %}Lösch Anfragen{% endblock %}
|
|
|
|
{% block content %}
|
|
{% if session['theme'] == 'darkmode' %}
|
|
<style>
|
|
.delete-container {
|
|
background: rgba(20, 20, 20, 0.95);
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.7);
|
|
max-width: 800px;
|
|
width: 100%;
|
|
min-height: 300px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
text-align: center;
|
|
}
|
|
.delete-container h2 {
|
|
text-align: center;
|
|
color: #00fff7;
|
|
}
|
|
.delete-container table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 20px;
|
|
color: #fff;
|
|
}
|
|
.delete-container th, .delete-container td {
|
|
padding: 10px;
|
|
border: 1px solid #333;
|
|
text-align: left;
|
|
}
|
|
.delete-container th {
|
|
background-color: #00fff7;
|
|
color: #111;
|
|
}
|
|
.delete-container .message {
|
|
color: #ff4d4d;
|
|
margin-top: 10px;
|
|
}
|
|
.approve-button {
|
|
background-color: #39ff14;
|
|
color: #111;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
font-weight: bold;
|
|
}
|
|
.approve-button:hover {
|
|
background-color: #28a745;
|
|
color: #fff;
|
|
}
|
|
.deny-button {
|
|
background-color: #FF0000;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
font-weight: bold;
|
|
}
|
|
.deny-button:hover {
|
|
background-color: #CC0000;
|
|
}
|
|
.delete-back-btn-row {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 18px;
|
|
}
|
|
.delete-back-btn {
|
|
display: inline-block;
|
|
text-align: center;
|
|
width: auto;
|
|
padding: 14px 28px;
|
|
margin-top: 10px;
|
|
}
|
|
</style>
|
|
<div style="display:flex; flex-direction:column; align-items:center; width:100%;">
|
|
<div class="delete-container">
|
|
<h2>Lösch Anfragen</h2>
|
|
{% if delete_requests|length == 0 %}
|
|
<p class="message">Zurzeit keine aktive Lösch-Anfragen</p>
|
|
{% else %}
|
|
<table>
|
|
<tr>
|
|
<th>Lizenzschlüssel</th>
|
|
<th>Benutzername</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
{% for request in delete_requests %}
|
|
<tr>
|
|
<td>{{ request['license_key'] }}</td>
|
|
<td>{{ request['username'] }}</td>
|
|
<td>
|
|
<form action="{{ url_for('approve_delete_request', request_id=request['_id']) }}" method="post" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="approve-button">Genehmigen</button>
|
|
</form>
|
|
<form action="{{ url_for('deny_delete_request', request_id=request['_id']) }}" method="post" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="deny-button">Ablehnen</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
<div class="delete-back-btn-row">
|
|
<a href="{{ url_for('dashboard') }}" class="neon-button neon3 delete-back-btn"><span>Zurück</span></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<style>
|
|
.delete-container {
|
|
background: rgba(255,255,255,0.9);
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
max-width: 800px;
|
|
width: 100%;
|
|
min-height: 300px;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
text-align: center;
|
|
}
|
|
.delete-container h2 {
|
|
text-align: center;
|
|
color: #007BFF;
|
|
}
|
|
.delete-container table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
}
|
|
.delete-container th, .delete-container td {
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
text-align: left;
|
|
}
|
|
.delete-container th {
|
|
background-color: #007BFF;
|
|
color: white;
|
|
}
|
|
.delete-container .message {
|
|
color: red;
|
|
margin-top: 10px;
|
|
}
|
|
.approve-button {
|
|
background-color: #28a745;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
}
|
|
.approve-button:hover {
|
|
background-color: #218838;
|
|
}
|
|
.deny-button {
|
|
background-color: #FF0000;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
}
|
|
.deny-button:hover {
|
|
background-color: #CC0000;
|
|
}
|
|
.delete-back-btn-row {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin-top: 18px;
|
|
}
|
|
.delete-back-btn {
|
|
background-color: #007BFF;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
width: auto;
|
|
text-align: center;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
margin-top: 10px;
|
|
}
|
|
.delete-back-btn:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
</style>
|
|
<div style="display:flex; flex-direction:column; align-items:center; width:100%;">
|
|
<div class="delete-container">
|
|
<h2>Lösch Anfragen</h2>
|
|
{% if delete_requests|length == 0 %}
|
|
<p class="message">Zurzeit keine aktive Lösch-Anfragen</p>
|
|
{% else %}
|
|
<table>
|
|
<tr>
|
|
<th>Lizenzschlüssel</th>
|
|
<th>Benutzername</th>
|
|
<th>Aktionen</th>
|
|
</tr>
|
|
{% for request in delete_requests %}
|
|
<tr>
|
|
<td>{{ request['license_key'] }}</td>
|
|
<td>{{ request['username'] }}</td>
|
|
<td>
|
|
<form action="{{ url_for('approve_delete_request', request_id=request['_id']) }}" method="post" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="approve-button">Genehmigen</button>
|
|
</form>
|
|
<form action="{{ url_for('deny_delete_request', request_id=request['_id']) }}" method="post" style="display:inline;">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button type="submit" class="deny-button">Ablehnen</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
<div class="delete-back-btn-row">
|
|
<a href="{{ url_for('dashboard') }}" class="delete-back-btn">Zurück</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|