{% extends "main_card.html.twig" %}

{% block title %}{% trans %}login.title{% endtrans %}{% endblock %}

{% block card_title %}<h5>
    <i class="fa fa-sign-in-alt fa-fw" aria-hidden="true"></i>
    {% trans %}login.card_title{% endtrans %}
    </h5>
{% endblock %}

{% block  content %}

    {% if error %}
        <div class="alert alert-danger" role="alert">
            <strong>{{ error.messageKey|trans(error.messageData, 'security') }}</strong>
        </div>
    {% endif %}

    {{ parent() }}
{% endblock %}

{% block card_content %}

    {% if saml_enabled %}
        <div class="{{ offset_label }} {{ col_input }}">
            <a class="btn btn-secondary" href="{{ path('saml_login') }}"><i class="fa-solid fa-house-user"></i> {% trans %}login.sso_saml_login{% endtrans %}</a>

            <p class="text-muted">{% trans %}login.local_login_hint{% endtrans %}</p>
        </div>
    {% endif %}

    {{ form_start(form) }}

    {{ form_row(form._username) }}
    {{ form_row(form._password) }}
    {{ form_row(form._remember_me) }}
    {{ form_row(form.submit) }}

    {{ form_end(form) }}

    {% if allow_email_pw_reset %}
        <a class="{{ offset_label }}" href="{{ path('pw_reset_request') }}">{% trans %}pw_reset.password_forget{% endtrans %}</a>
    {% endif %}
{% endblock %}
