includes/modals/login_modal.php

<!-- Login form modal, shown open on the standalone login page (see includes/modules/login.php). -->
<dialog class="modal" id="login-modal" open>
    <div>
        <img src="<?= brivaciaLogoPlaceholder() ?>" alt="">
        <h2><?= h(t('auth.login.title')) ?></h2>

        <?php if (!empty($authError)): ?>
            <p class="danger"><?= h($authError) ?></p>
        <?php endif; ?>

        <form method="post">
            <input name="auth_action" type="hidden" value="login">

            <label>
                <?= h(t('auth.username')) ?>
                <input autocapitalize="off" autocomplete="username" autocorrect="off" name="username" required spellcheck="false">
            </label>

            <label>
                <?= h(t('auth.password')) ?>
                <input autocapitalize="off" autocomplete="current-password" autocorrect="off" name="password" type="password" required spellcheck="false">
                <button aria-label="<?= h(t('ui.reveal')) ?>" data-token-toggle title="<?= h(t('ui.reveal')) ?>" type="button"><?= icon('visits') ?></button>
            </label>

            <?php if (function_exists('brivaciaTwoFactorEnabled') && brivaciaTwoFactorEnabled()): ?>
                <label>
                    <?= h(t('auth.two_factor.code')) ?>
                    <input
                        autocapitalize="off"
                        autocomplete="one-time-code"
                        autocorrect="off"
                        enterkeyhint="done"
                        inputmode="numeric"
                        maxlength="16"
                        name="totp"
                        placeholder="<?= h(t('auth.two_factor.code.help')) ?>"
                        required
                        spellcheck="false"
                        type="text"
                    >
                </label>
            <?php endif; ?>

            <label class="checkbox">
                <?= h(t('auth.remember')) ?>
                <input name="remember" type="checkbox">
            </label>

            <button type="submit"><?= h(t('auth.login.button')) ?> <?= icon('log-in') ?></button>
        </form>
    </div>
</dialog>

Contribute