Benutzer Bearbeitung hinzugefügt
This commit is contained in:
72
templates/edit_user.html
Normal file
72
templates/edit_user.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-section-title">
|
||||
<h1>User bearbeiten</h1>
|
||||
<p>Stammdaten des Users aktualisieren.</p>
|
||||
</div>
|
||||
|
||||
<section class="card form-card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title"><i class="ti ti-user-edit me-1"></i>Userdaten</h2>
|
||||
<form method="post" action="{{ url_for('edit_user', user_id=user.id) }}">
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<label class="form-label">Vorname</label>
|
||||
<input class="form-control" type="text" name="first_name" value="{{ first_name }}" required>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="form-label">Nachname</label>
|
||||
<input class="form-control" type="text" name="last_name" value="{{ last_name }}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">E-Mail</label>
|
||||
<input class="form-control" type="email" name="email" value="{{ user.email or '' }}">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Abteilung</label>
|
||||
<input class="form-control" type="text" name="department" value="{{ user.department or '' }}">
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit"><i class="ti ti-device-floppy me-1"></i>Speichern</button>
|
||||
<a class="btn btn-outline-secondary" href="{{ url_for('index') }}">Abbrechen</a>
|
||||
<button class="btn btn-danger float-end" type="button" onclick="if(confirm('User wirklich loeschen?')){document.getElementById('delete-form').submit();}"><i class="ti ti-trash me-1"></i>Loeschen</button>
|
||||
</form>
|
||||
<form id="delete-form" method="post" action="{{ url_for('delete_user', user_id=user.id) }}"></form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h2 class="card-title"><i class="ti ti-key me-1"></i>Zugeordnete Medien</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-vcenter">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Kennung</th>
|
||||
<th>Vergeben seit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Türchip</td>
|
||||
<td>{{ user.chip_code or "-" }}</td>
|
||||
<td>{{ user.chip_assigned_at or "-" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Parkkarte</td>
|
||||
<td>{{ user.parking_card_code or "-" }}</td>
|
||||
<td>{{ user.parking_card_assigned_at or "-" }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Poolfahrzeug</td>
|
||||
<td>{{ user.pool_vehicle_code or "-" }}</td>
|
||||
<td>{{ user.pool_vehicle_assigned_at or "-" }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user