{# templates/cours/ajouter.html.twig #} {% extends 'base.html.twig' %} {% block body %}

Ajouter un Cours

{# Commence le formulaire #} {{ form_start(form, {'attr': {'class': 'needs-validation', 'novalidate': 'novalidate'}}) }} {# Affiche chaque champ du formulaire avec un joli style #}
{{ form_label(form.libelle, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.libelle, {'attr': {'class': 'form-control'}}) }} {{ form_errors(form.libelle) }}
{{ form_label(form.ageMini, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.ageMini, {'attr': {'class': 'form-control'}}) }} {{ form_errors(form.ageMini) }}
{{ form_label(form.heureDebut, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.heureDebut, {'attr': {'class': 'form-control', 'type': 'time'}}) }} {{ form_errors(form.heureDebut) }}
{{ form_label(form.heureFin, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.heureFin, {'attr': {'class': 'form-control', 'type': 'time'}}) }} {{ form_errors(form.heureFin) }}
{{ form_label(form.typeInstrument, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.typeInstrument, {'attr': {'class': 'form-select'}}) }} {{ form_errors(form.typeInstrument) }}
{{ form_label(form.jour, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.jour, {'attr': {'class': 'form-select'}}) }} {{ form_errors(form.jour) }}
{{ form_label(form.professeur, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.professeur, {'attr': {'class': 'form-select'}}) }} {{ form_errors(form.professeur) }}
{{ form_label(form.typeCours, null, {'label_attr': {'class': 'form-label'}}) }} {{ form_widget(form.typeCours, {'attr': {'class': 'form-select'}}) }} {{ form_errors(form.typeCours) }}
{# Ajouter un bouton d'enregistrement avec un joli style #}
{{ form_widget(form.enregistrer, {'attr': {'class': 'btn btn-primary btn-lg'}}) }}
{# Fin du formulaire #} {{ form_end(form) }}
{% endblock %}