{% extends 'base.html.twig' %}
{% block title %}
	{{ parent() }}
	Ajout fichier
{% endblock %}
{% block body %}
	<div class="container-fluid">
		<div class="row justify-content-center">
			<div class="col-12 col-sm-10 col-md-8 text-primary">
				<h1 class="text-center text-primary mt-4 pt-4 fw-bold">AJOUTER UN FICHIER</h1>
				{{ form_start(form) }}
				{{ form_row(form.fichier) }}
				{{ form_row(form.user) }}
				<div class="mt-5 bg-white p-4">
					<div class="table-responsive">
						<table class="table">
							{% set id = null %}
							{% for scategorie in scategories %}
								{% if id != scategorie.categorie.id %}
									{% set id = scategorie.categorie.id %}
									<tr class="table-primary" style="color: white;">
										<td class="fw-bold">{{ scategorie.categorie.id }}
											{{ scategorie.categorie.libelle }}</td>
										<td></td>
									</tr>
								{% endif %}
								<tr class="table-secondary">
									<td class="text-primary">-
										{{ scategorie.numero }}
										{{ scategorie.libelle }}</td>
									<td class="text-primary">{{ form_widget(form.scategories[scategorie.id]) }}</td>
								</tr>
							{% endfor %}
						</table>
					</div>
				</div>
				<div class="mt-4">
					{{ form_row(form.ajouter) }}
				</div>
				{{ form_end(form) }}
			</div>
		</div>
	</div>
{% endblock %}
