From 349e4b1ea5a5cecb0d803bb33e0dc44737f552af Mon Sep 17 00:00:00 2001 From: Antoine B Date: Thu, 15 Jun 2017 10:32:03 +0200 Subject: [PATCH] Add not null validation on prospect for an Etude (#113) * Add assert not null on Etude.prospect * Add breadcrumb for etude ajouter template Ping #83 --- src/Mgate/SuiviBundle/Entity/Etude.php | 1 + .../SuiviBundle/Resources/views/Etude/ajouter.html.twig | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/Mgate/SuiviBundle/Entity/Etude.php b/src/Mgate/SuiviBundle/Entity/Etude.php index 2dc9fd3ad..170d09145 100644 --- a/src/Mgate/SuiviBundle/Entity/Etude.php +++ b/src/Mgate/SuiviBundle/Entity/Etude.php @@ -147,6 +147,7 @@ class Etude /** * @Assert\Valid() + * @Assert\NotNull() * @ORM\ManyToOne(targetEntity="Mgate\PersonneBundle\Entity\Prospect", cascade={"persist"}) * @ORM\JoinColumn(nullable=false) */ diff --git a/src/Mgate/SuiviBundle/Resources/views/Etude/ajouter.html.twig b/src/Mgate/SuiviBundle/Resources/views/Etude/ajouter.html.twig index 99c681939..e7f0688e7 100644 --- a/src/Mgate/SuiviBundle/Resources/views/Etude/ajouter.html.twig +++ b/src/Mgate/SuiviBundle/Resources/views/Etude/ajouter.html.twig @@ -8,6 +8,13 @@ {{ 'suivi.etude_ajouter'|trans({}, 'suivi') }} {% endblock %} +{% block breadcrumb %} + +{% endblock %} + {% block content_bundle %} {% for error in errors %}