{% extends '@AdminLTE/FOSUserBundle/Security/login.html.twig' %}

{% block logo_login %}{% include 'partials/logo_login.html.twig' %}{% endblock %}
{% block title %}{{- get_title() -}}{% endblock %}

{% block head %}
    {{ parent() }}
    {% include 'partials/head.html.twig' %}
    {% set event = trigger(constant('App\\Event\\ThemeEvent::HTML_HEAD')) %}
    {{ event.content|raw }}
{% endblock %}

{% block stylesheets %}
    {{ encore_entry_link_tags('app') }}
    {% set event = trigger(constant('App\\Event\\ThemeEvent::STYLESHEET')) %}
    {{ event.content|raw }}
{% endblock %}

{% block javascripts %}
    {{ encore_entry_script_tags('app') }}
    {% set event = trigger(constant('App\\Event\\ThemeEvent::JAVASCRIPT')) %}
    {{ event.content|raw }}
{% endblock %}

{% block login_social_auth %}
    {% if kimai_config.samlActive %}
        {% set class = 'btn-primary' %}
        {% if kimai_config.loginFormActive %}
            {% set class = 'btn-google' %}
        {% endif %}
        <a href="{{ path('saml_login') }}" class="btn btn-block {{ class }}">
            <span>{{ kimai_config.samlTitle|trans }}</span>
        </a>
        <br>
    {% endif %}
{% endblock %}

{% block login_form %}
    {% if kimai_config.loginFormActive %}
        {{ parent() }}
    {% endif %}
{% endblock %}

{% block login_actions %}
    <div class="login-actions">
    {% if kimai_config.passwordResetActive %}
        <a class="text-muted action-register" href="{{ path('fos_user_resetting_request') }}">
            {{ 'I forgot my password'|trans({}, 'AdminLTEBundle') }}
        </a>
    {% endif %}
    {% if kimai_config.selfRegistrationActive %}
        <a class="text-muted action-password" href="{{ path('fos_user_registration_register') }}">
            {{ 'Register a new account'|trans({}, 'AdminLTEBundle') }}
        </a>
    {% endif %}
    </div>
{% endblock %}
