{% extends '@EckinoxAdminUi/base.html.twig' %}
{% block title %}{% trans %}eckinox_admin_ui.titles.log_in{% endtrans %}{% endblock %}
{% block body %}
<div class="main d-flex justify-content-center w-100">
<main class="content d-flex p-0">
<div class="container d-flex flex-column">
<div class="row h-100">
<div class="col-sm-10 col-md-8 col-lg-6 mx-auto d-table h-100">
<div class="d-table-cell align-middle">
<div class="text-center mt-4 mb-4">
{% block app_logo_login %}
{% set logo = 'eckinox_admin_ui.app.logo_login'|trans %}
{% if logo != 'eckinox_admin_ui.app.logo_login' %}
<img src="{{ asset(logo|trans) }}" class="login-logo mb-4 w-50" />
{% endif %}
{% endblock %}
<h1 class="h2">{% trans %}eckinox_admin_ui.titles.log_in{% endtrans %}</h1>
</div>
<div class="card">
<div class="card-body">
<div class="m-sm-4">
<form method="post" id="login_form">
{% if error %}
<div class="alert alert-danger alert-outline-coloured alert-dismissible" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<div class="alert-icon">
<i class="far fa-fw fa-bell"></i>
</div>
<div class="alert-message">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
</div>
{% endif %}
<div class="mb-3">
<label class="form-label" for="username">
{% trans %}eckinox_admin_ui.fields.email{% endtrans %}
</label>
<input class="form-control form-control-lg" id="username" type="email" value="{{ last_username }}" name="_username" placeholder="{% trans %}eckinox_admin_ui.placeholders.email{% endtrans %}" required autofocus />
</div>
<div class="mb-3">
<label class="form-label" for="password">
{% trans %}eckinox_admin_ui.fields.password{% endtrans %}
</label>
<input class="form-control form-control-lg" id="password" type="password" name="_password" placeholder="{% trans %}eckinox_admin_ui.placeholders.password{% endtrans %}" required />
<small>
<a href="{{ link_forgot_password }}" class="">{% trans %}eckinox_admin_ui.buttons.forgot_password{% endtrans %}</a>
</small>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
{% if target_path is defined %}
<input type="hidden" name="_target_path" value="{{ target_path }}"/>
{% endif %}
<div>
<div class="form-check align-items-center">
<input id="_remember_me" type="checkbox" class="form-check-input" name="_remember_me" checked>
<label class="form-check-label text-small" for="_remember_me">{% trans %}eckinox_admin_ui.fields.remember_me{% endtrans %}</label>
</div>
</div>
<div class="text-center mt-3 d-grid gap-2">
<button type="submit" class="btn btn-lg btn-primary">
{% trans %}eckinox_admin_ui.buttons.sign_in{% endtrans %}
</button>
{% if facebook_login %}
<div class="d-flex justify-content-between align-items-center separator"><hr><span>Ou</span><hr></div>
<a href="{{ path('eckinox_security_connect_facebook_start') }}" class="btn btn-lg btn-facebook">
{% trans %}eckinox_admin_ui.buttons.facebook{% endtrans %}
</a>
{% endif %}
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
{% endblock %}