<?php $oldUsername = Session::getFlash('old')['username'] ?? ''; ?>
<form method="POST" action="/login" id="login-form">
    <?= csrf_field() ?>
    <div class="mb-3">
        <label class="form-label"><?= lang('auth.username') ?></label>
        <div class="input-group">
            <span class="input-group-text"><i class="fas fa-user"></i></span>
            <input type="text" name="username" class="form-control" value="<?= e($oldUsername) ?>" autofocus required placeholder="<?= lang('auth.username') ?>">
        </div>
    </div>
    <div class="mb-3">
        <label class="form-label"><?= lang('auth.password') ?></label>
        <div class="input-group">
            <span class="input-group-text"><i class="fas fa-lock"></i></span>
            <input type="password" name="password" class="form-control" required placeholder="<?= lang('auth.password') ?>">
        </div>
    </div>
    <div class="d-grid">
        <button type="submit" class="btn btn-primary btn-lg"><?= lang('auth.login') ?></button>
    </div>
</form>