56 lines
1.5 KiB
PHTML
56 lines
1.5 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* @var array<int, string> $errors
|
|
* @var array $form
|
|
*/
|
|
|
|
|
|
|
|
?>
|
|
<div class="app-details-container">
|
|
|
|
<section>
|
|
<?php
|
|
$breadcrumbs = [
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
['label' => t('Users'), 'path' => 'admin/users'],
|
|
['label' => t('Create user')],
|
|
];
|
|
require templatePath('partials/app-breadcrumb.phtml');
|
|
?>
|
|
<div class="app-details-titlebar">
|
|
<h1>
|
|
<a href="admin/users" title="<?php e(t('Cancel')); ?>"><i class="bi bi-arrow-left"></i></a>
|
|
<?php e(t('Create user')); ?>
|
|
</h1>
|
|
<div class="app-details-titlebar-actions">
|
|
<button type="submit" form="user-form" name="action" value="create" class="secondary outline">
|
|
<?php e(t('Create')); ?>
|
|
</button>
|
|
<button type="submit" form="user-form" name="action" value="create_close" class="primary">
|
|
<?php e(t('Create & close')); ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<?php if (!empty($errors)): ?>
|
|
<div class="notice" data-variant="error">
|
|
<ul>
|
|
<?php foreach ($errors as $error): ?>
|
|
<li><?php e($error); ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php
|
|
$values = $form ?? [];
|
|
$passwordRequired = true;
|
|
$detailsOpenAll = true;
|
|
$passwordLabel = t('Password');
|
|
$passwordLegend = t('Password');
|
|
$passwordConfirmLabel = t('Password (again)');
|
|
require __DIR__ . '/_form.phtml';
|
|
?>
|
|
</section>
|
|
</div>
|