Phase1 Bearbeitung

This commit is contained in:
2026-06-15 18:36:57 +02:00
parent e4fa714419
commit 06645f1e9c
29 changed files with 3367 additions and 300 deletions
+92
View File
@@ -0,0 +1,92 @@
<?php
$scope = trim((string) ($scope ?? old('scope')));
if ($scope === '') {
$scope = trim((string) ($_GET['scope'] ?? ''));
}
$scope = $scope === 'tenant' ? 'tenant' : 'platform';
$tenantSlug = trim((string) ($tenantSlug ?? old('tenant_slug')));
if ($tenantSlug === '') {
$tenantSlug = trim((string) ($_GET['tenantSlug'] ?? $_GET['tenant'] ?? ''));
}
$tenantName = trim((string) ($tenantName ?? old('tenant_name')));
if ($tenantName === '') {
$tenantName = trim((string) ($_GET['tenantName'] ?? ''));
}
if ($tenantName === '' && $tenantSlug !== '') {
$tenantName = 'Standort ' . $tenantSlug;
}
if ($tenantName === '') {
$tenantName = 'Standortzugang';
}
$loginUrl = $scope === 'tenant'
? ($tenantSlug !== '' ? tenant_url($tenantSlug, 'login') : '/')
: '/admin/login';
$emailLabel = $scope === 'tenant' ? 'Login-E-Mail' : 'Admin-E-Mail';
require __DIR__ . '/../partials/layout-top.php';
?>
<section class="page-head">
<span class="eyebrow">Passwort vergessen</span>
<h1>Reset-Anfrage vorbereiten</h1>
<p>
<?= e($scope === 'platform'
? 'Diese Seite sammelt die Anfrage fuer einen Plattform-Reset.'
: 'Diese Seite sammelt die Anfrage fuer den Standort-Reset von ' . $tenantName . '.') ?>
Im Pilotbetrieb kann die Bestaetigung noch manuell begleitet werden.
</p>
</section>
<div class="two-column">
<form class="card form-card" method="post" action="<?= e(current_path()) ?>">
<?= csrf_field($csrf) ?>
<input type="hidden" name="scope" value="<?= e($scope) ?>">
<?php if ($tenantSlug !== ''): ?>
<input type="hidden" name="tenant_slug" value="<?= e($tenantSlug) ?>">
<?php endif; ?>
<?php if ($scope === 'tenant' && $tenantName !== ''): ?>
<input type="hidden" name="tenant_name" value="<?= e($tenantName) ?>">
<?php endif; ?>
<label>
<span><?= e($emailLabel) ?></span>
<input type="email" name="email" value="<?= e((string) old('email')) ?>" required>
</label>
<?php if ($scope !== 'platform' && $tenantSlug === ''): ?>
<label>
<span>Standort-Slug</span>
<input type="text" name="tenant_slug" value="<?= e((string) old('tenant_slug')) ?>" placeholder="mein-team" required>
</label>
<?php endif; ?>
<button class="button button-primary" type="submit">Reset-Link anfordern</button>
<p class="muted">Nach dem Versand soll der Link wieder auf diese Strecke zurueckfuehren und danach zum passenden Login.</p>
<p><a class="text-link" href="<?= e($loginUrl) ?>">Zurueck zum Login</a></p>
</form>
<aside class="card">
<span class="eyebrow">Pilotablauf</span>
<ul class="stack-list">
<li>
<strong>1. E-Mail pruefen</strong>
<small>Die Anfrage sollte immer ueber die bekannte Login-Adresse laufen.</small>
</li>
<li>
<strong>2. Reset bestaetigen</strong>
<small>Im Pilot kann diese Freigabe vorerst noch manuell durch Plattform- oder Standortteam begleitet werden.</small>
</li>
<li>
<strong>3. Neues Passwort setzen</strong>
<small>Danach geht es ueber die Confirm-Seite direkt zurueck in den passenden Login.</small>
</li>
</ul>
</aside>
</div>
<?php require __DIR__ . '/../partials/layout-bottom.php'; ?>