diff --git a/src/Form/IncidentType.php b/src/Form/IncidentType.php new file mode 100644 index 0000000..9bee257 --- /dev/null +++ b/src/Form/IncidentType.php @@ -0,0 +1,33 @@ +add('description', + TextareaType::class) + ->add('employee', EntityType::class, ['class' => Employee::class, 'choice_label' => 'firstname']) +// ->add('incidentType', EntityType::class, ['class' => IncidentType::class, 'choice_label' => 'id']) + ->add('Enregistrer', SubmitType::class) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + // Configure your form options here + ]); + } +} diff --git a/templates/incident/index.html.twig b/templates/incident/index.html.twig new file mode 100644 index 0000000..58bbe65 --- /dev/null +++ b/templates/incident/index.html.twig @@ -0,0 +1,30 @@ +{% extends 'base.html.twig' %} + +{% block title %}Incident index{% endblock %} + +{% block body %} +
Id | +Description | +|
---|---|---|
{{ incident.id }} | +{{ incident.description }} | ++ show + edit + | +