{% extends 'base.html.twig' %} {% form_theme form 'form_table_layout.html.twig' %} {% block title %}Ajout / Édition de Formation{% endblock %} {% block body %}

{% if form.vars.value.id %}Modifier la formation{% else %}Ajouter une formation{% endif %}

{# Affichage des messages de succès ou d'erreur #} {% for message in app.flashes('success') %}
{{ message }}
{% endfor %} {% for message in app.flashes('error') %}
{{ message }}
{% endfor %} {{ form_start(form, {'attr': {'id': 'formationForm'}}) }} {# Champs du formulaire #} {{ form_row(form.dateDebut) }} {{ form_row(form.nbreHeures) }} {{ form_row(form.departement) }} {{ form_row(form.adresse) }} {{ form_row(form.leproduit) }} {{ form_row(form.nom) }} {{ form_end(form) }} {% endblock %}