{% extends 'base.html.twig' %}
{% block title %}Register{% endblock %}
{% block body %}
{% form_theme registrationForm 'bootstrap_5_layout.html.twig' %}
<script src="scripts/registerSelect.js"></script>
<body onload="return showUser()">
<form method="post">
<div class="col-sm-4 col-xs-12">
<div class="form-group">
<h1>Créer un compte</h1>
{{ form_start(registrationForm) }}
{{ form_row(registrationForm.role, {'attr': {'onchange': 'return showUser();'}}) }}
{{ form_row(registrationForm.firstName) }}
{{ form_row(registrationForm.lastName) }}
{{ form_row(registrationForm.email) }}
{{ form_row(registrationForm.password) }}
{{ form_row(registrationForm.confirmPassword) }}
<div id="formCandidat" class="formCandidat">
</div>
<div id="formAdminS" class="formAdminS">
<a href="#" id="modalStructure">+ Ajouter une structure</a>
{{ form_row(registrationForm.nomStructure) }}
</div>
{# {{ form_widget(registrationForm) }}#}
<div align="center">
<button type="submit">S'inscrire</button>
</div>
{{ form_end(registrationForm) }}
</div>
</div>
<div class="modal fade" id="ajoutModal" tabindex="-1" aria-labelledby="ajoutModalLabel" aria-hidden="false">
<div class="modal-dialog modal-dialog-centered" style="max-width: 50%">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title main-low-title" id="ajoutModalLabel">Ajout d'une structure</h1>
<button type="button" class="btn-close bg-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div>
<form id="formStructure" method="post">
<input id="nomStructure" name="nomStructure" type="text" class="form-control" placeholder="Nom de la structure" required>
<textarea id="descriptionStructure" name="descriptionStructure" placeholder="Description de la structure" required></textarea>
<br>
<button id="structureSubmit" type="submit" class="btn btn-primary" form="formStructure">Envoyer</button>
</form>
</div>
</div>
</div>
</div>
</form>
</body>
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('register') }}
{% endblock %}