Skip to content

Commit

Permalink
Add not null validation on prospect for an Etude (#113)
Browse files Browse the repository at this point in the history
* Add assert not null on Etude.prospect

* Add breadcrumb for etude ajouter template

Ping #83
  • Loading branch information
Stoakes committed Jun 16, 2017
1 parent 405d443 commit 349e4b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Mgate/SuiviBundle/Entity/Etude.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class Etude

/**
* @Assert\Valid()
* @Assert\NotNull()
* @ORM\ManyToOne(targetEntity="Mgate\PersonneBundle\Entity\Prospect", cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
*/
Expand Down
7 changes: 7 additions & 0 deletions src/Mgate/SuiviBundle/Resources/views/Etude/ajouter.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
{{ 'suivi.etude_ajouter'|trans({}, 'suivi') }}
{% endblock %}

{% block breadcrumb %}
<ul class="breadcrumb no-margin pull-right">
<li><a href="{{ path('MgateSuivi_etude_homepage') }}">{{ 'suivi.suivi_etude'|trans({}, 'suivi') }}</a></li>
<li class="active">{{ 'suivi.etude_ajouter'|trans({}, 'suivi') }}</li>
</ul>
{% endblock %}

{% block content_bundle %}
{% for error in errors %}
<div class="alert alert-warning">
Expand Down

0 comments on commit 349e4b1

Please sign in to comment.