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>
40 lines
1.6 KiB
PHP
40 lines
1.6 KiB
PHP
<section class="card">
|
|
<h2 class="section-title"><?= $e($t('users.title')) ?></h2>
|
|
<p class="muted mt-12"><?= $e($t('users.description')) ?></p>
|
|
</section>
|
|
|
|
<section class="card mt-16">
|
|
<h2 class="section-title"><?= $e($t('users.create_title')) ?></h2>
|
|
|
|
<?php if (!empty($errorMessage)): ?>
|
|
<div class="mt-12"><?php $type='danger'; $message=(string) $errorMessage; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($successMessage)): ?>
|
|
<div class="mt-12"><?php $type='success'; $message=(string) $successMessage; $dismissible=true; include dirname(__DIR__) . '/components/alert.php'; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<form class="users-form mt-16" action="/settings/users" method="post" novalidate>
|
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('users.fields.name')) ?></span>
|
|
<input class="form-control" type="text" name="name" required value="<?= $e($oldName ?? '') ?>">
|
|
</label>
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('users.fields.email')) ?></span>
|
|
<input class="form-control" type="email" name="email" required value="<?= $e($oldEmail ?? '') ?>">
|
|
</label>
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('users.fields.password')) ?></span>
|
|
<input class="form-control" type="password" name="password" required>
|
|
</label>
|
|
|
|
<button type="submit" class="btn btn--primary"><?= $e($t('users.actions.add_user')) ?></button>
|
|
</form>
|
|
</section>
|
|
|
|
<?php require __DIR__ . '/../components/table-list.php'; ?>
|