Files
TK-Wiki-Newsletter/app/templates/users.html
2026-07-03 11:35:25 +02:00

44 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<section class="card">
<h2>Benutzerverwaltung</h2>
<form method="post" action="/admin/users" class="form-grid">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<label>E-Mail
<input type="email" name="email" required>
</label>
<label>Vollständiger Name
<input type="text" name="full_name" required>
</label>
<label>Passwort
<input type="password" name="password" required minlength="10">
</label>
<label>Rolle
<select name="role">
<option value="reader">Reader</option>
<option value="editor">Editor</option>
<option value="admin">Admin</option>
</select>
</label>
<button type="submit">Benutzer erstellen</button>
</form>
</section>
<section class="card">
<h3>Bestehende Benutzer</h3>
<table>
<thead><tr><th>E-Mail</th><th>Name</th><th>Rolle</th><th>Aktiv</th></tr></thead>
<tbody>
{% for u in users %}
<tr>
<td>{{ u.email }}</td>
<td>{{ u.full_name }}</td>
<td>{{ u.role }}</td>
<td>{{ "Ja" if u.is_active else "Nein" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endblock %}