{#
SPDX-FileCopyrightText: 2026 Martin Kirchgessner

SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% extends 'layout.jinja' %}
{% block title %}Log in{% endblock title %}

{% from 'macros.jinja' import password_field %}
{% block content %}
<div class="columns is-centered">
    <div class="column is-half">
        <form method="POST"
            class="is-half box"
            hx-post=""{{ url_for('login.log_in') }}""
            hx-disabled-elt="find button[type=submit]"
            >
            <div class="field is-horizontal">
                <div class="field-label">
                    <label for="username" class="label">Username</label>
                </div>
                <div class="field-body">
                    <div class="field">
                        <input type="text" name="username" id="username" class="input" required>
                    </div>
                </div>
            </div>
            {{ password_field("Password") }}
            <div class="field">
                <button type="submit" class="button is-primary">
                    Log in
                </button>
            </div>
        </form>
    </div>
</div>
{% endblock content %}

