opencode ergebnis V0.1
This commit is contained in:
1 parent
61d86a3d83
commit
7e498ebc3f
71 files changed
+28982
-46
No files matched your search
@@ -0,0 +1,100 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Accountverwaltung - CMBNet{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Accountverwaltung</h1>
|
||||
<p><a href="{{ url_for('views.dispatcher', tenant=session.tenant_code) }}">← Zurück</a> | <a href="{{ url_for('auth.logout', tenant=session.tenant_code) }}">Abmelden</a></p>
|
||||
|
||||
<table id="accountsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Rolle</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in accounts %}
|
||||
<tr data-id="{{ account.id }}">
|
||||
<td>{{ account.id }}</td>
|
||||
<td>{{ account.name }}</td>
|
||||
<td>
|
||||
<select onchange="changeRole({{ account.id }}, this.value)">
|
||||
<option value="Gast" {% if account.role == 'Gast' %}selected{% endif %}>Gast</option>
|
||||
<option value="Beobachter" {% if account.role == 'Beobachter' %}selected{% endif %}>Beobachter</option>
|
||||
<option value="Gruppe" {% if account.role == 'Gruppe' %}selected{% endif %}>Gruppe</option>
|
||||
<option value="Dispatcher" {% if account.role == 'Dispatcher' %}selected{% endif %}>Dispatcher</option>
|
||||
<option value="Administrator" {% if account.role == 'Administrator' %}selected{% endif %}>Administrator</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button onclick="openPasswordModal({{ account.id }})">Passwort zurücksetzen</button>
|
||||
<button class="secondary" onclick="deleteAccount({{ account.id }})">Löschen</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button onclick="openCreateAccountModal()">Neuer Account</button>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('admin_gruppen.gruppen', tenant=session.tenant_code) }}">Gruppenverwaltung</a></li>
|
||||
<li><a href="{{ url_for('admin_strassen.strassen', tenant=session.tenant_code) }}">Straßenverwaltung</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<!-- Passwort Modal -->
|
||||
<dialog id="passwordModal">
|
||||
<article>
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closePasswordModal()"></a>
|
||||
<h3>Passwort zurücksetzen</h3>
|
||||
</header>
|
||||
<input type="hidden" id="pwdAccountId">
|
||||
<label>Neues Passwort
|
||||
<input type="password" id="newPassword">
|
||||
</label>
|
||||
<footer>
|
||||
<button onclick="closePasswordModal()">Abbrechen</button>
|
||||
<button onclick="resetPassword()">Zurücksetzen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
|
||||
<!-- Create Account Modal -->
|
||||
<dialog id="createAccountModal">
|
||||
<article>
|
||||
<header>
|
||||
<a href="#close" aria-label="Close" class="close" onclick="closeCreateAccountModal()"></a>
|
||||
<h3>Neuer Account</h3>
|
||||
</header>
|
||||
<label>Name
|
||||
<input type="text" id="newAccountName">
|
||||
</label>
|
||||
<label>Passwort
|
||||
<input type="password" id="newAccountPassword">
|
||||
</label>
|
||||
<label>Rolle
|
||||
<select id="newAccountRole">
|
||||
<option value="Gast">Gast</option>
|
||||
<option value="Beobachter">Beobachter</option>
|
||||
<option value="Gruppe">Gruppe</option>
|
||||
<option value="Dispatcher">Dispatcher</option>
|
||||
<option value="Administrator">Administrator</option>
|
||||
</select>
|
||||
</label>
|
||||
<footer>
|
||||
<button onclick="closeCreateAccountModal()">Abbrechen</button>
|
||||
<button onclick="createAccount()">Anlegen</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/views/admin_accounts.js') }}"></script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user