Loading module/Application/src/Controller/ContratController.php +5 −4 Changes for module/Application/src/Controller/ContratController.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -154,8 +154,9 @@ class ContratController extends AbstractController /* @var $intervenant Intervenant */ $structure = $this->getEvent()->getParam('structure'); /* @var $structure Structure */ $projetContrat = $this->getEvent()->getParam('projetContrat'); /* @var $projetContrat boolean */ $contratProjetResult = $this->getServiceParametres()->get('contrat_projet'); $contratProjet = ($contratProjetResult == Parametre::CONTRAT_PROJET); if (!$intervenant) { throw new \LogicException('L\'intervenant n\'est pas précisé'); Loading @@ -172,11 +173,11 @@ class ContratController extends AbstractController } else { try { $this->getProcessusContrat()->enregistrer($contrat); if (!$projetContrat) { if ($contratProjet) { $this->getProcessusContrat()->valider($contrat); } $this->updateTableauxBord($contrat->getIntervenant()); if (!$projetContrat) { if ($contratProjet) { $this->flashMessenger()->addSuccessMessage(($contrat->estUnAvenant() ? 'L\'avenant' : 'Le contrat') . ' a bien été créé.'); } else { $this->flashMessenger()->addSuccessMessage('Le projet ' . ($contrat->estUnAvenant() ? 'd\'avenant' : 'de contrat') . ' a bien été créé.'); Loading module/Application/src/Form/ParametresForm.php +0 −1 Changes for module/Application/src/Form/ParametresForm.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -588,7 +588,6 @@ class ParametresForm extends AbstractForm 'name' => 'contrat_projet', 'options' => [ 'label' => 'Possibilité de créer un contrat sans passer par le projet', 'value_options' => [ PARAMETRE::CONTRAT_PROJET => 'Le contrat peut être crée sans passer par le projet', 'desactive' => 'Fonctionnalité désactivée', Loading module/Application/view/application/contrat/index.phtml +2 −2 Changes for module/Application/view/application/contrat/index.phtml: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -69,12 +69,12 @@ $this->messenger() ?> <?php if ($canCreer): if ($contratProjet):?> <a class="btn btn-primary" href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId(), 'contratProjet' => $contratProjet]); ?>"> href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId()]); ?>"> <i class="fas fa-file"></i> Créer un <?= $hasContrat ? 'avenant' : 'contrat' ?> </a> <?php else: ?> <a class="btn btn-primary" href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId(), 'contratProjet' => $contratProjet]); ?>"> href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId()]); ?>"> <i class="fas fa-file"></i> Créer un projet <?= $hasContrat ? 'd\'avenant' : 'de contrat' ?> </a> <?php endif; Loading Loading
module/Application/src/Controller/ContratController.php +5 −4 Changes for module/Application/src/Controller/ContratController.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -154,8 +154,9 @@ class ContratController extends AbstractController /* @var $intervenant Intervenant */ $structure = $this->getEvent()->getParam('structure'); /* @var $structure Structure */ $projetContrat = $this->getEvent()->getParam('projetContrat'); /* @var $projetContrat boolean */ $contratProjetResult = $this->getServiceParametres()->get('contrat_projet'); $contratProjet = ($contratProjetResult == Parametre::CONTRAT_PROJET); if (!$intervenant) { throw new \LogicException('L\'intervenant n\'est pas précisé'); Loading @@ -172,11 +173,11 @@ class ContratController extends AbstractController } else { try { $this->getProcessusContrat()->enregistrer($contrat); if (!$projetContrat) { if ($contratProjet) { $this->getProcessusContrat()->valider($contrat); } $this->updateTableauxBord($contrat->getIntervenant()); if (!$projetContrat) { if ($contratProjet) { $this->flashMessenger()->addSuccessMessage(($contrat->estUnAvenant() ? 'L\'avenant' : 'Le contrat') . ' a bien été créé.'); } else { $this->flashMessenger()->addSuccessMessage('Le projet ' . ($contrat->estUnAvenant() ? 'd\'avenant' : 'de contrat') . ' a bien été créé.'); Loading
module/Application/src/Form/ParametresForm.php +0 −1 Changes for module/Application/src/Form/ParametresForm.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -588,7 +588,6 @@ class ParametresForm extends AbstractForm 'name' => 'contrat_projet', 'options' => [ 'label' => 'Possibilité de créer un contrat sans passer par le projet', 'value_options' => [ PARAMETRE::CONTRAT_PROJET => 'Le contrat peut être crée sans passer par le projet', 'desactive' => 'Fonctionnalité désactivée', Loading
module/Application/view/application/contrat/index.phtml +2 −2 Changes for module/Application/view/application/contrat/index.phtml: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -69,12 +69,12 @@ $this->messenger() ?> <?php if ($canCreer): if ($contratProjet):?> <a class="btn btn-primary" href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId(), 'contratProjet' => $contratProjet]); ?>"> href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId()]); ?>"> <i class="fas fa-file"></i> Créer un <?= $hasContrat ? 'avenant' : 'contrat' ?> </a> <?php else: ?> <a class="btn btn-primary" href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId(), 'contratProjet' => $contratProjet]); ?>"> href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId()]); ?>"> <i class="fas fa-file"></i> Créer un projet <?= $hasContrat ? 'd\'avenant' : 'de contrat' ?> </a> <?php endif; Loading