adasd
All checks were successful
Deploy / deploy-staging (push) Successful in 26s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-15 21:36:36 +02:00
parent 94ea3c58af
commit 5408a2bb89
5 changed files with 118 additions and 15 deletions

View File

@@ -143,9 +143,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<label class="login-field">
<span>Passwort</span>
<div class="login-password-row">
<input type="password" name="password" value="" required data-password-field>
<input type="password" name="password" value="<?= htmlspecialchars($form['password'], ENT_QUOTES) ?>" required data-password-field>
<button class="login-password-toggle" type="button" data-password-toggle aria-label="Passwort anzeigen">
<span aria-hidden="true">◉</span>
<svg class="login-password-icon login-password-icon-show" viewBox="0 0 24 24" aria-hidden="true">
<path d="M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.8"/>
</svg>
<svg class="login-password-icon login-password-icon-hide" viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 3l18 18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
<path d="M10.6 5.2A11 11 0 0 1 12 5c6.4 0 10 7 10 7a18.8 18.8 0 0 1-3.1 3.8M6.7 6.7C4 8.5 2 12 2 12a18.4 18.4 0 0 0 10 6 10.8 10.8 0 0 0 4.1-.8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.9 9.9A3 3 0 0 0 14.1 14.1" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
</svg>
</button>
</div>
</label>
@@ -153,9 +161,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<label class="login-field">
<span>Passwort wiederholen</span>
<div class="login-password-row">
<input type="password" name="password_confirm" value="" required data-password-field>
<input type="password" name="password_confirm" value="<?= htmlspecialchars($form['password_confirm'], ENT_QUOTES) ?>" required data-password-field>
<button class="login-password-toggle" type="button" data-password-toggle aria-label="Passwort anzeigen">
<span aria-hidden="true">◉</span>
<svg class="login-password-icon login-password-icon-show" viewBox="0 0 24 24" aria-hidden="true">
<path d="M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6-10-6-10-6Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.8"/>
</svg>
<svg class="login-password-icon login-password-icon-hide" viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 3l18 18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
<path d="M10.6 5.2A11 11 0 0 1 12 5c6.4 0 10 7 10 7a18.8 18.8 0 0 1-3.1 3.8M6.7 6.7C4 8.5 2 12 2 12a18.4 18.4 0 0 0 10 6 10.8 10.8 0 0 0 4.1-.8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.9 9.9A3 3 0 0 0 14.1 14.1" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
</svg>
</button>
</div>
</label>

View File

@@ -13,12 +13,21 @@ $token = trim((string) ($_GET['token'] ?? $_POST['token'] ?? ''));
$record = $service->validate($token);
$message = null;
$error = null;
$form = [
'password' => '',
'password_confirm' => '',
];
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$form = [
'password' => (string) ($_POST['password'] ?? ''),
'password_confirm' => (string) ($_POST['password_confirm'] ?? ''),
];
$result = $service->complete(
$token,
(string) ($_POST['password'] ?? ''),
(string) ($_POST['password_confirm'] ?? '')
$form['password'],
$form['password_confirm']
);
if ($result['success'] ?? false) {
@@ -58,12 +67,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<input type="hidden" name="token" value="<?= htmlspecialchars($token, ENT_QUOTES) ?>">
<label class="login-field">
<span>Neues Passwort</span>
<input type="password" name="password" required>
<input type="password" name="password" value="<?= htmlspecialchars($form['password'], ENT_QUOTES) ?>" required>
</label>
<label class="login-field">
<span>Neues Passwort wiederholen</span>
<input type="password" name="password_confirm" required>
<input type="password" name="password_confirm" value="<?= htmlspecialchars($form['password_confirm'], ENT_QUOTES) ?>" required>
</label>
<div class="login-actions">