25 lines
1.8 KiB
HTML
25 lines
1.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% block title %}{{ u.name or 'Nieuwe gebruiker' }}{% endblock %}
|
|
{% block content %}
|
|
<div class="head">
|
|
<div><a class="label" href="{{ url_for('users') }}">← Gebruikers</a><h1>{{ 'Gebruiker bewerken' if u.id else 'Nieuwe gebruiker' }}</h1></div>
|
|
</div>
|
|
<form method="post" class="card"><div class="card-body">
|
|
<div class="row g-3">
|
|
<div class="col-md-6"><label class="form-label" for="name">Naam *</label><input class="form-control" id="name" name="name" value="{{ u.name }}" required></div>
|
|
<div class="col-md-6"><label class="form-label" for="email">E-mailadres (inlognaam) *</label><input class="form-control" id="email" type="email" name="email" value="{{ u.email }}" required></div>
|
|
<div class="col-md-6"><label class="form-label" for="role">Rol</label>
|
|
<select class="form-select" id="role" name="role">{% for k, l in ROLES %}<option value="{{ k }}" {{ 'selected' if u.role == k }}>{{ l }}</option>{% endfor %}</select>
|
|
</div>
|
|
<div class="col-md-6"><label class="form-label" for="password">{{ 'Nieuw wachtwoord' if u.id else 'Wachtwoord *' }}</label>
|
|
<input class="form-control" id="password" type="password" name="password" minlength="8" {{ 'required' if not u.id }} autocomplete="new-password">
|
|
{% if u.id %}<p class="hint">Leeg laten om het huidige wachtwoord te houden.</p>{% endif %}</div>
|
|
<div class="col-12"><div class="form-check"><input class="form-check-input" type="checkbox" id="active" name="active" value="1" {{ 'checked' if u.active }}><label class="form-check-label" for="active">Actief (mag inloggen)</label></div></div>
|
|
</div>
|
|
<div class="actions">
|
|
<button class="btn btn-primary">Opslaan</button>
|
|
<a class="btn btn-outline-secondary" href="{{ url_for('users') }}">Annuleren</a>
|
|
</div>
|
|
</div></form>
|
|
{% endblock %}
|