{% extends 'base.html.twig' %}
{% block recaptcha %}<script src='https://www.google.com/recaptcha/api.js'></script>{% endblock %}
{% block title %}Accedi{% endblock %}
{% block header %}{% endblock %}
{% block content %}
<section class="m_tb_110p">
<div class="container">
<div class="row">
<div class="col-12 txt_a_c m_b_40p">
<img src="{{ asset (asset_graphics ~ '/logo-dark.png') }}" width="200" alt="Filoscafo"/>
</div>
<div class="col-12 col-md-6 offset-md-3">
<form action="{{ path('login_check') }}" method="post">
<div class="row">
<div class="col-12">
<div class="form-group">
<label>{% trans from "website" %}login_02{% endtrans %}</label>
<input class="form-control" type="text" id="username" name="email" value="{{ last_username }}"/>
</div>
<div class="form-group">
<label>{% trans from "website" %}login_03{% endtrans %}</label>
<input class="form-control" type="password" id="password" name="password" />
<a href="javascript:recoverPassword()"><label class="underline color_pr m_t_10p">{% trans from "website" %}login_04{% endtrans %}</label></a>
</div>
</div>
<div class="col-12 m_t_20p txt_a_c">
<button type="submit" class="button button-border button-rounded button-pr width_120p">{% trans from "website" %}login_05{% endtrans %}</button><br>
</div>
<div class="col-12 m_t_20p txt_a_c">
<a href="{{ path ('registration') }}"><u>{% trans from "website" %}login_14{% endtrans %}</u></a>
</div>
</div>
<input type="hidden" name="form_login_csrf_token" value="{{ csrf_token('authenticate') }}">
</form>
</div>
</div>
</div>
</section>
{% if error %}
<div class="alert alert-dismissible alert-warning notice">
<i class="icon-warning-sign"></i><strong>{% trans from "website" %}login_06{% endtrans %}</strong> {% trans from "website" %}login_07{% endtrans %}
<button type="button" class="btn-close btn-sm" data-bs-dismiss="alert" aria-hidden="true"></button>
</div>
{% endif %}
{# MODALE RECUPERA PASSWORD #}
<div id="modalRecover" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
{{ form_start(form, {'attr': {'novalidate': 'novalidate'}}) }}
<div class="modal-header"><h4 class="modal-title text-uppercase txt_a_c">{% trans from "website" %}login_08{% endtrans %}</h4></div>
<div class="modal_stripe"></div>
<div class="modal-body">
<div class="row">
<div class="col-12">
<p class="m_b_10p txt_a_j">{% trans from "website" %}login_09{% endtrans %}</p>
<div class="form-group">
<label>{% trans from "website" %}login_10{% endtrans %}*</label>
<div {{ form_errors(form.email.first) }}>
{{ form_widget(form.email.first, {'attr': {'class': 'form-control max_w_280p m_auto'}}) }}
</div>
</div>
<div class="form-group">
<label>{% trans from "website" %}login_11{% endtrans %}*</label>
<div {{ form_errors(form.email.second) }}>
{{ form_widget(form.email.second, {'attr': {'class': 'form-control max_w_280p m_auto'}}) }}
</div>
</div>
<div {{ form_errors(form.recaptcha) }}>
{{ form_widget(form.recaptcha) }}
<div id="divRecaptcha" class="g-recaptcha" data-sitekey="6LcEdHAnAAAAAOVdwvS5a74pHAAEvPfLTk8gHrhe"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer" style="display: flow-root">
<a href="javascript:void(0)" class="button button-border button-rounded button-small button-red f_left" data-bs-dismiss="modal">{% trans from "website" %}login_12{% endtrans %}</a>
<button type="submit" class="button button-border button-rounded button-small button-green f_right">{% trans from "website" %}login_13{% endtrans %}</a>
</div>
{{ form_end(form) }}
</div>
</div>
</div>
{% endblock %}
{% block footer %}{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
function recoverPassword(){
$('#modalRecover').modal({backdrop: 'static', keyboard: false}).modal("show");
}
</script>
{% endblock %}