domovoy/templates/auth/login.php

32 lines
1.5 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>
<?php if (isset($error)): ?>
<div class="alert alert-danger"><?= htmlspecialchars($error) ?></div>
<?php endif; ?>
<form method="POST" action="/login">
<div class="mb-3">
<label for="username" class="form-label">Имя пользователя</label>
<input type="text" class="form-control" id="username" name="username" required autofocus>
</div>
<div class="mb-3">
<label for="password" class="form-label">Пароль</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary w-100">Войти</button>
</form>
<div class="text-center mt-3">
<small class="text-muted">
Нет аккаунта? <a href="/setup">Создать первого пользователя</a>
</small>
</div>
</div>
</div>
</div>
</div>
<?php $content = ob_get_clean(); ?>
<?php require dirname(__DIR__) . '/layout.php'; ?>