{% extends "template_1/layoutAuth.html.twig" %}
{% block title %}Connexion{% endblock %}
{% block body %}
<form class="form" action="{{path('app_login')}}" method="POST" >
{% for mesg in app.session.getflashbag.get('ina') %}
<div class="alert alert-info ">{{mesg}}</div>
{% endfor %}
{% for mesg in app.session.getflashbag.get('login.user.lock') %}
<div class="alert alert-warning ">{{mesg}}</div>
{% endfor %}
{% for mesg in app.session.getflashbag.get('login.user.already.login') %}
<div class="alert alert-warning ">{{mesg}}</div>
{% endfor %}
{% for mesg in app.session.getflashbag.get('login.form.ivalide') %}
<div class="alert alert-danger ">{{mesg}} </div>
{% endfor %}
{% for mesg in app.session.getflashbag.get('login.user.prod.erreur') %}
<div class="alert alert-danger ">{{mesg}}</div>
{% endfor %}
{% for mesg in app.session.getflashbag.get('logout.success') %}
<div class="alert alert-success ">{{mesg}}</div>
{% endfor %}
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<div class="form-group">
<select name="prod" class="form-control" >
<option value="" >
{{'site.login.choisir.produit'|trans}}
</option>
{#% for unProduit in listeProduit%}
<option value="{{unProduit.id}}" >
{{unProduit.nomProduit}}
</option>
{% endfor %#}
</select>
</div>
<div class="form-group mb-5">
<input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control h-auto form-control-solid py-4 px-8" autocomplete="username" placeholder="{{'site.login.pseudo'|trans}}" required autofocus>
</div>
<div class="form-group mb-5">
<input type="password" name="password" id="inputPassword" class="form-control h-auto form-control-solid py-4 px-8" autocomplete="current-password" placeholder="{{'site.login.password'|trans}}" required>
</div>
<div class="form-group d-flex flex-wrap justify-content-between align-items-center">
<label class="checkbox m-0 text-muted">
<span></span></label>
<a href="{{path("admin_downlaod_app")}}" id="kt_login_forgot" class="text-muted text-hover-primary">Télécharger</a>
</div>
<button id="kt_login_signin_submit" class="btn btn-primary font-weight-bold px-9 py-4 my-3 mx-4">{{'site.valider'|trans}}</button>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<!--end::Form group-->
<!--end::Action-->
{% for restoreUrl in app.session.getflashbag.get('restoreUrl') %}
<input type="hidden" name="restoreUrl" value="{{restoreUrl}}" />
{% endfor %}
</form>
{% endblock %}
{% block scripts %}
{{parent()}}
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
{% endblock %}