46 lines
1.7 KiB
PHP
46 lines
1.7 KiB
PHP
|
|
<?php
|
||
|
|
$pageTitle = 'New Account';
|
||
|
|
$error = $error ?? '';
|
||
|
|
ob_start();
|
||
|
|
?>
|
||
|
|
<section class="admin-card">
|
||
|
|
<div class="badge">Accounts</div>
|
||
|
|
<div style="display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;">
|
||
|
|
<div>
|
||
|
|
<h1 style="font-size:28px; margin:0;">New Account</h1>
|
||
|
|
<p style="color: var(--muted); margin-top:6px;">Create an admin, manager, or editor account.</p>
|
||
|
|
</div>
|
||
|
|
<a href="/admin/accounts" class="btn outline small">Back</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php if ($error): ?>
|
||
|
|
<div style="margin-top:16px; color:#f3b0b0; font-size:13px;"><?= htmlspecialchars($error, ENT_QUOTES, 'UTF-8') ?></div>
|
||
|
|
<?php endif; ?>
|
||
|
|
|
||
|
|
<form method="post" action="/admin/accounts/save" style="margin-top:18px; display:grid; gap:16px;">
|
||
|
|
<div class="admin-card" style="padding:16px;">
|
||
|
|
<div style="display:grid; gap:12px;">
|
||
|
|
<label class="label">Name</label>
|
||
|
|
<input class="input" name="name" placeholder="Name">
|
||
|
|
<label class="label">Email</label>
|
||
|
|
<input class="input" name="email" placeholder="name@example.com">
|
||
|
|
<label class="label">Password</label>
|
||
|
|
<input class="input" type="password" name="password" placeholder="Password">
|
||
|
|
<label class="label">Role</label>
|
||
|
|
<select class="input" name="role">
|
||
|
|
<option value="admin">Admin</option>
|
||
|
|
<option value="manager">Manager</option>
|
||
|
|
<option value="editor">Editor</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div style="display:flex; justify-content:flex-end;">
|
||
|
|
<button type="submit" class="btn">Create account</button>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</section>
|
||
|
|
<?php
|
||
|
|
$content = ob_get_clean();
|
||
|
|
require __DIR__ . '/layout.php';
|