{% extends  'base.html' %}

{% block content %}
{% if messages %}
{% for message in messages %}
<div class="{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}bg-danger{% else %}bg-primary{% endif %} text-white">
    <span {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</span>
</div>
{% endfor %}
{% endif %}
<!-- Authentication form -->
<form action="{% url 'junopass:login' %}{% if verify%}?verify=true{% endif %}" method="POST">
    {% csrf_token %}
    <h1>Log In</h1>
    {{form.as_p}}
    <input name="challenge" type="hidden" value="{{challenge}}">
    <input name="device_id" type="hidden" value="{{device_id}}">
    <input name="verify" type="hidden" value="{{verify}}">
    <div class="pb-2">
        <button type="submit">
            Log In Without Password
        </button>
        <div>
            <small>
                <a href="https://junopass.com" target="_blank">Powered by JunoPass</a>
            </small>
        </div>
    </div>
</form>
{% endblock %}