Validates current password, enforces 8-char minimum, links from EasyAdmin user menu. Also fixes route loader (attribute scan instead of broken easyadmin.routes type). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
1.6 KiB
Twig
37 lines
1.6 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Passwort ändern{% endblock %}
|
|
|
|
{% block body %}
|
|
<div style="max-width:400px;margin:4rem auto;font-family:sans-serif">
|
|
<h1>Passwort ändern</h1>
|
|
|
|
{% for message in app.flashes('success') %}
|
|
<div style="color:green;margin-bottom:1rem">{{ message }}</div>
|
|
{% endfor %}
|
|
|
|
{% if error %}
|
|
<div style="color:red;margin-bottom:1rem">{{ error }}</div>
|
|
{% endif %}
|
|
|
|
<form method="post">
|
|
<div style="margin-bottom:1rem">
|
|
<label for="current_password">Aktuelles Passwort</label><br>
|
|
<input id="current_password" type="password" name="current_password" required autofocus style="width:100%;padding:.5rem">
|
|
</div>
|
|
<div style="margin-bottom:1rem">
|
|
<label for="new_password">Neues Passwort</label><br>
|
|
<input id="new_password" type="password" name="new_password" required minlength="8" style="width:100%;padding:.5rem">
|
|
</div>
|
|
<div style="margin-bottom:1rem">
|
|
<label for="confirm_password">Neues Passwort bestätigen</label><br>
|
|
<input id="confirm_password" type="password" name="confirm_password" required minlength="8" style="width:100%;padding:.5rem">
|
|
</div>
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('change_password') }}">
|
|
<div style="display:flex;gap:1rem;align-items:center">
|
|
<button type="submit" style="padding:.5rem 1rem">Passwort ändern</button>
|
|
<a href="{{ path('easyadmin') }}" style="color:#666">Zurück zum Dashboard</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|