2021-03-27 21:58:31 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% block header %}
|
|
|
|
{% block title %}<h1>Admin Übersicht</h1>{% endblock %}
|
|
|
|
|
|
|
|
<script src="../static/jquery-3.6.0.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<table border="1">
|
|
|
|
<td>Username</td>
|
|
|
|
<td>E-Mail</td>
|
|
|
|
<td>Aktiv</td>
|
|
|
|
<td>Aktionen</td>
|
|
|
|
{% for data in admin_data %}
|
|
|
|
<tr>
|
|
|
|
{% for field in ['username', 'email', 'active'] %}
|
|
|
|
<td>{{ data[field] if data[field] }}</td>
|
|
|
|
{% endfor %}
|
|
|
|
<td>
|
|
|
|
<a href="{{ url_for('admin_toggle_active', username=data['username']) }}"><img src="static/stop.png" title="Aktivieren/Deaktivieren" alt="Toggle active"></a>
|
|
|
|
<a href="{{ url_for('delete_admins', username=data['username']) }}"><img src="static/delete.png" title="Löschen" alt="Delete"></a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
<div>
|
|
|
|
<p>
|
|
|
|
Neuen Admin erstellen:
|
|
|
|
</p>
|
|
|
|
<form method="POST">
|
|
|
|
<table>
|
|
|
|
{{ form.csrf_token }}
|
|
|
|
<tr>
|
|
|
|
<td>{{ form.name.label }}</td>
|
|
|
|
<td>{{ form.name(size=20) }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{ form.email.label }}</td>
|
|
|
|
<td>{{ form.email(size=20) }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td>
|
|
|
|
<input type="submit" value="Abschicken">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-03-28 19:50:44 +00:00
|
|
|
<form action="{{ url_for('backup_user_datastore') }}" method="get">
|
|
|
|
<input type="submit" value="Admin Daten sichern">
|
|
|
|
</form>
|
|
|
|
<form action="{{ url_for('restore_user_datastore') }}" method=post enctype=multipart/form-data>
|
|
|
|
<input type=file name=file>
|
|
|
|
<input type=submit value="Admin Daten wiederherstellen">
|
|
|
|
</form>
|
2021-03-27 21:58:31 +00:00
|
|
|
{% endblock %}
|