domovoy/templates/auth/setup.php

31 lines
1.6 KiB
PHP

<?php ob_start(); ?>
<div class="row justify-content-center">
<div class="col-md-4">
<div class="card mt-5">
<div class="card-body">
<h4 class="card-title text-center mb-4">Создание первого пользователя</h4>
<p class="text-muted text-center">Это будет администратор системы "Домовой"</p>
<?php if (isset($error)): ?>
<div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
<?php endif; ?>
<form method="POST" action="/setup">
<div class="mb-3">
<label for="username" class="form-label">Имя пользователя</label>
<input type="text" class="form-control" id="username" name="username" required autofocus
minlength="2" maxlength="255">
</div>
<div class="mb-3">
<label for="password" class="form-label">Пароль</label>
<input type="password" class="form-control" id="password" name="password" required
minlength="8">
<div class="form-text">Минимум 8 символов</div>
</div>
<button type="submit" class="btn btn-primary w-100">Создать аккаунт</button>
</form>
</div>
</div>
</div>
</div>
<?php $content = ob_get_clean(); ?>
<?php require dirname(__DIR__) . '/layout.php'; ?>