{% extends 'base.html.twig' %}
{% from 'Front/macros.html.twig' import blockCompetition %}
{% block title %}Africa TKD Referee{% endblock %}
{% block body %}
<div class="example-wrapper">
{% if not app.user %}
<div class="p-2 bg-light border">
<form class="row" method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
<div class="col-lg-5 col-sm-12 mb-3">
<label for="inputEmail" class="visually-hidden">Email</label>
<input type="email" value="{{ last_username }}" name="email" class="form-control" id="inputEmail" placeholder="email@example.com" autocomplete="email" required autofocus>
</div>
<div class="col-lg-5 col-sm-12 mb-3">
<label for="inputPassword" class="visually-hidden">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" autocomplete="current-password" required>
</div>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
{# <input type="hidden" name="reponsecaptcha" id="recaptcha"> #}
<div class="col">
<button type="submit" class="btn btn-primary col-lg-12 col-sm-12 mb-3">Sign in</button>
</div>
<div class="row">
<div class="col">
<a href="{{ path('app_forgot_password_request') }}" class="btn btn-link">Forgot your password ?</a>
</div>
<div class="col">
<a href="{{ path('app_register') }}" class="btn btn-link float-end text-success">No account ? Create one here</a>
</div>
</div>
</form>
{# <script src="https://www.google.com/recaptcha/api.js?render=6Lf_McYqAAAAAPCyFezgpaRprnf-ji6KiXkK7ckW"></script>
<script>
grecaptcha.ready(function () {
grecaptcha.execute('6Lf_McYqAAAAAPCyFezgpaRprnf-ji6KiXkK7ckW', { action: 'contact' }).then(function (token) {
var recaptchaResponse = document.getElementById('recaptcha');
recaptchaResponse.value = token;
});
});
</script> #}
</div>
{% else %}
{% if not app.user.isverified %}
<div class="alert alert-dismissible alert-danger">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
<strong>Your email address is not yet verified</strong>
an email is sent to you, please validate your email address
if expired <a href="{{ path('emailverify') }}" class="alert-link">you can resend </a>
</div>
{% endif %}
{% endif %}
{% for competition in competitions %}
{{ blockCompetition(competition) }}
{% endfor %}
</div>
{% endblock %}