Phase 120 - Plan 01:
- Reusable PHP alert component (resources/views/components/alert.php)
with inline SVG icon per type, optional dismiss button.
- Missing .alert--info SCSS variant added (#eff6ff/#bfdbfe/#1e3a8a) -
fixes black-on-white alert after Fakturownia test connection.
- Flash::push(type, message) + Flash::all() with BC for set/get;
legacy key heuristic (error/.save/warning -> typed entries).
- Central flash renderer in 3 layouts (app/auth/public) iterating
Flash::all() through component (.alerts-stack wrap).
- Vanilla JS alert-dismiss.js with idempotent guard and delegated
click handler on [data-alert-dismiss].
- 36 views migrated off inline <div class="alert alert--TYPE">;
.flash--error/success removed from views (orders/show, shipments/prepare).
- SCSS rebuilt: public/assets/css/{app,login}.css.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
48 lines
1.8 KiB
PHP
48 lines
1.8 KiB
PHP
<section class="login-card" aria-labelledby="login-title">
|
|
<header class="login-header">
|
|
<p class="login-badge"><?= $e($t('brand.name_full')) ?></p>
|
|
<h1 id="login-title"><?= $e($t('auth.login.heading')) ?></h1>
|
|
<p class="login-subtitle"><?= $e($t('auth.login.subtitle')) ?></p>
|
|
</header>
|
|
|
|
<?php if (!empty($errorMessage)): ?>
|
|
<div class="login-alert"><?php $type='danger'; $message=(string) $errorMessage; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<form class="login-form" action="/login" method="post" novalidate>
|
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('auth.login.email_label')) ?></span>
|
|
<input
|
|
type="email"
|
|
class="form-control"
|
|
name="email"
|
|
autocomplete="email"
|
|
required
|
|
placeholder="<?= $e($t('auth.login.email_placeholder')) ?>"
|
|
value="<?= $e($oldEmail ?? '') ?>"
|
|
>
|
|
</label>
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('auth.login.password_label')) ?></span>
|
|
<input
|
|
type="password"
|
|
class="form-control"
|
|
name="password"
|
|
autocomplete="current-password"
|
|
required
|
|
placeholder="<?= $e($t('auth.login.password_placeholder')) ?>"
|
|
>
|
|
</label>
|
|
|
|
<label class="form-field form-field--inline remember-field">
|
|
<input type="checkbox" name="remember" value="1" <?= !empty($oldRemember) ? 'checked' : '' ?>>
|
|
<span class="field-label"><?= $e($t('auth.login.remember_me')) ?></span>
|
|
</label>
|
|
|
|
<button type="submit" class="btn btn--primary btn--block login-submit"><?= $e($t('actions.login')) ?></button>
|
|
</form>
|
|
</section>
|