{% extends 'base.html.twig' %}
{% block title %}{{ 'auth.inscription_title'|trans }} - {{ 'app.name'|trans }}{% endblock %}
{% form_theme form 'bootstrap_4_layout.html.twig' %}
{% block bodyClass %}auth-page create-page{% endblock %}
{# {% form_theme form 'bootstrap_4_layout.html.twig' %} #}
{% block body %}
<div class="auth-wrap">
<div class="auth-header">
<!-- Logo -->
<img class="auth-logo" src="{{ asset('images/labo.svg') }}" alt="{{ 'app.name'|trans }}">
<!-- Lang -->
{#<div class="dropdown lang-dropdown">
<button class="btn btn-lang dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{% if app.request.locale == 'fr' %}
{{ 'header.fr'|trans }}
{% else %}
{{ 'header.en'|trans }}
{% endif %}
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% if app.request.locale == 'fr' %}
<a class="dropdown-item" href="{{ path('setlocale', {'language': 'en'}) }}">{{ 'header.en'|trans }}</a>
{% else %}
<a href="{{ path('setlocale', {'language': 'fr'}) }}">{{ 'header.fr'|trans }}</a>
{% endif %}
</div>
</div>#}
</div>
<!-- Flash messages-->
{% include 'common/all_flash.html.twig' %}
<div class="auth-content">
<div class="form-col">
<div class="auth-block">
<h1 class="auth-title">{{ 'auth.inscription_title'|trans }}</h1>
<div class="auth-text">{{ 'auth.or'|trans }} <a href="{{ path('app_login') }}">{{
'auth.connect_account'|trans }}</a></div>
{# <form method="post" class="auth-form" autocomplete="off"> #}
{{ form_start(form, {
'attr': {
'id': 'form_create_account',
'class': 'form-create-account validate',
'method': 'POST'
}
}) }}
{{ form_errors(form) }}
{#{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}#}
<div class="form-group {#{% if error %}has-error{% endif %}#}">
{# <input type="text" id="first_name" class="form-control" name="_first_name" value=""
placeholder="{{ 'form.label.first_name'|trans }}" required="required"
autocomplete="first_name" />
<label class="required" for="first_name">{{ 'form.label.first_name'|trans }}</label> #}
{{ form_row(form.firstName) }}
<div class="help-text">
{{ 'form.alert.first_name'|trans }}
</div>
</div>
<div class="form-group {#{% if error %}has-error{% endif %}#}">
{# <input type="text" id="last_name" class="form-control" name="_last_name" value=""
placeholder="{{ 'form.label.last_name'|trans }}" required="required"
autocomplete="last_name" />
<label class="required" for="last_name">{{ 'form.label.last_name'|trans }}</label> #}
{{ form_row(form.lastName) }}
<div class="help-text">
{{ 'form.alert.last_name'|trans }}
</div>
</div>
<div class="form-group">
{{ form_row(form.statut) }}
</div>
<div class="form-group {#{% if error %}has-error{% endif %}#}">
{# <input type="text" id="university" class="form-control" name="_university" value=""
placeholder="{{ 'form.label.organization'|trans }}" />
<label for="university">{{ 'form.label.organization'|trans }}</label> #}
{{ form_row(form.organization) }}
</div>
<div class="form-group {#{% if error %}has-error{% endif %}#}">
{# <input type="text" id="username" class="form-control" name="_username" value=""
placeholder="{{ 'form.label.email'|trans }}" required="required" autocomplete="off" />
<label class="required" for="username">{{ 'form.label.email'|trans }}</label> #}
{{ form_row(form.email) }}
<div class="help-text">
{{ 'form.alert.email'|trans }}
</div>
</div>
<div class="form-group form-password-group {#{% if error %}has-error{% endif %}#}">
<div class="form-password-box">
{# <input type="password" id="password" class="form-control check-password-valid"
name="_password" required="required" placeholder="{{ 'form.label.password'|trans }}"
autocomplete="off" />
<label class="required" for="password">{{ 'form.label.password'|trans }}</label> #}
{{ form_row(form.password.first, {'attr' : {'class' : 'check-password-valid'}}) }}
<a href="javascript:void(0)" class="password-text-link password-show-link2"><i
class="icon-eye"></i></a>
<a href="javascript:void(0)" class="password-text-link password-hide-link2"><i
class="icon-eye-slash"></i></a>
</div>
<div class="help-text">
{{ 'form.alert.password'|trans }}
</div>
<div class="password-strength d-none">
<span data-regex="3">{{ 'form.password.checkPassword3'|trans }}</span>
<span data-regex="2">{{ 'form.password.checkPassword2'|trans }}</span>
<span data-regex="1">{{ 'form.password.checkPassword1'|trans }}</span>
<span data-regex="0">{{ 'form.password.checkPassword0'|trans }}</span>
</div>
</div>
<div class="form-group form-password-group {#{% if error %}has-error{% endif %}#}">
<div class="form-password-box">
{# <input type="password" id="confirmation_password" class="form-control"
name="_confirmation_password" required="required"
placeholder="{{ 'form.label.confirmation_password'|trans }}" autocomplete="off" />
<label class="required" for="confirmation_password">{{
'form.label.confirmation_password'|trans }}</label> #}
{{ form_row(form.password.second, {'attr' : {'class' : 'check-password-valid'}}) }}
<a href="javascript:void(0)" class="password-text-link password-show-link2"><i
class="icon-eye"></i></a>
<a href="javascript:void(0)" class="password-text-link password-hide-link2"><i
class="icon-eye-slash"></i></a>
</div>
<div class="help-text">
{{ 'form.alert.password'|trans }}
</div>
</div>
<div class="form-group">
<div class="form-checkbox">
<input type="checkbox" name="cgu" value="1" id="cgu" required="required">
<label for="cgu">
<span class="icon"></span>
{% set url_cgu = path('page', {'code': constant('App\\Entity\\Page::CODE')['TERMS_OF_SERVICE']}) %}
{{ 'form.label.read_accept'|trans }} <a href="{{ url_cgu }}">{{ 'form.action.cgu'|trans }}</a>
</label>
</div>
</div>
{{ form_row(form.submit) }}
{# <button class="btn btn-primary btn-lg" type="submit">
{{ 'form.action.register'|trans }}
</button> #}
<div class="mandatory-text">{{ 'form.label.mandatory'|trans }}</div>
{#
</form> #}
{{ form_end(form) }}
</div>
</div>
<!-- Text -->
<div class="text-col">
<div class="auth-text-block">
<div id="typed-strings">
<p>{{ 'auth.title.first_word'|trans }} </p>
<p>{{ 'auth.title.second_word'|trans }} </p>
<p>{{ 'auth.title.third_word'|trans }} </p>
</div>
<div id="typed-strings2">
<p>{{ 'auth.title.fourth_word'|trans }} </p>
<p>{{ 'auth.title.fith_word'|trans }} </p>
</div>
<h2 class="auth-text-title">
<p class="typed-text" id="typed"></p>{{ 'auth.title.last_sentence'|trans }} <p class="typed-text typed-alt-text" id="typed2"></p>
</h2>
<div class="auth-text-text">
{{ 'auth.text'|trans }}
</div>
{#<div class="auth-text-action">
<a class="btn btn-primary-outline btn-lg" href="#" target="_blank">{{ 'auth.btn'|trans }}</a>
</div>#}
</div>
</div>
</div>
</div>
<style>
.password-hide-link2 { display: none;}
</style>
<script>
// code doublon avec app/integration/js/front.js line 208 because yarn install bug
// fait en full JS et non jquery car jquery pas dispo ici
document.addEventListener('DOMContentLoaded', function () {
// SHOW PASSWORD
document.addEventListener('click', function (e) {
if (e.target.closest('.password-show-link2')) {
const link = e.target.closest('.password-show-link2');
const box = link.closest('.form-password-box');
const input = box.querySelector('input.form-control');
box.querySelector('.password-show-link2').style.display = 'none';
box.querySelector('.password-hide-link2').style.display = 'inline';
input.type = 'text';
}
});
// HIDE PASSWORD
document.addEventListener('click', function (e) {
if (e.target.closest('.password-hide-link2')) {
const link = e.target.closest('.password-hide-link2');
const box = link.closest('.form-password-box');
const input = box.querySelector('input.form-control');
box.querySelector('.password-hide-link2').style.display = 'none';
box.querySelector('.password-show-link2').style.display = 'inline';
input.type = 'password';
}
});
});
</script>
{% endblock %}