{% extends 'base_client.html.twig' %}
{% block body %}
<div class="formulaire-login">
<form method="post" class="form-inscription">
<div class="div-input div-registration">
<h1>VOXDIA</h1>
<h2>Sign in</h2>
{{ error|raw }}
<div class="input-form">
<div class="input-form-input">
{{ form_widget(form.email, { 'attr': {'class': 'input-registration-email input-style', 'placeholder': 'Email *', 'type': 'email', 'autofocus': ''}}) }}
</div>
</div>
<div class="input-form">
<div class="input-form-input">
{{ form_widget(form.password, { 'attr': {'class': 'input-registration-password input-style', 'placeholder': 'Password *', 'minlength': '8'}}) }}
</div>
</div>
<div class="input-form">
<div class="input-form-input">
{{ form_widget(form.passwordConfirm, { 'attr': {'class': 'input-registration-confirm-password input-style', 'placeholder': 'Confirm password *', 'minlength': '8'}}) }}
</div>
</div>
<div class="input-form">
<div class="input-form-input">
{{ form_widget(form.name, { 'attr': {'class': 'input-registration-first-name input-style', 'placeholder': 'First name', 'autocomplete':'off'}}) }}
</div>
</div>
<div class="input-form">
<div class="input-form-input">
{{ form_widget(form.lastname, { 'attr': {'class': 'input-registration-last-name input-style', 'placeholder': 'Last name', 'autocomplete':'off'}}) }}
</div>
</div>
{{ form_row(form._token) }}
<div>
<button class="input-form-submit button-style" type="submit" style="width: 100%;">Continue</button>
</div>
<hr class="input-form-hr" />
<a href="{{ path('app_login') }}">
<div class="input-form-connexion">
Connexion
</div>
</a>
</div>
</form>
</div>
<script>
$(document).ready( function () {
$('.input-form-submit').click(function (e) {
e.preventDefault();
$('.input-form-submit').attr('disabled', 'disabled').css('opacity', '0.3');
if ($('.input-registration-confirm-password').val() != $('.input-registration-password').val()) {
alert('Mdp different');
} else {
$('.form-inscription').submit();
}
});
});
</script>
{% endblock %}