Loading module/Oscar/src/Oscar/Controller/ConventionModeleEtapeAdministrationController.php +21 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,27 @@ class ConventionModeleEtapeAdministrationController extends AbstractOscarControl } $za->close(); } else if ($this->params()->fromPost('action') == "definir_etape_suivante") { if ($this->params()->fromPost('type_suite') == "etape") { if (!$this->params()->fromPost('question_suivante_id')) { return $this->getResponseNotFound("Veuillez indiquer l'étape suivante."); } /** @var \Oscar\Entity\ConventionModeleEtape $conventionModeleEtapeSuivante */ $conventionModeleEtapeSuivante = $this->getEntityManager()->find(\Oscar\Entity\ConventionModeleEtape::class, $this->params()->fromPost('question_suivante_id')); if (!$conventionModeleEtapeSuivante) { return $this->getResponseNotFound("L'étape suivante n'a pas été trouvée."); } $conventionModeleEtape->conventionModeleEtapeSuivante = $conventionModeleEtapeSuivante; } else { $conventionModeleEtape->conventionModeleEtapeSuivante = NULL; } $conventionModeleEtape->dateUpdated = new \DateTime(); $conventionModeleEtape->updatedBy = $this->getCurrentPerson(); $this->getEntityManager()->flush(); } return $this->redirect()->toRoute('administration/conventionModeles/configurer/etapes/configurer', ['id' => $conventionModele->id, 'idEtape' => $conventionModeleEtape->id]); Loading module/Oscar/src/Oscar/Entity/ConventionModeleEtape.php +7 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,13 @@ class ConventionModeleEtape */ public $fichierDateAjout; /** * @var ?ConventionModeletEtape * @ORM\ManyToOne(targetEntity="ConventionModeleEtape") * @ORM\JoinColumn(onDelete="SET NULL") */ public $conventionModeleEtapeSuivante; public function __construct() { $this->dateCreated = new \DateTime(); Loading module/Oscar/view/oscar/convention-modele-etape-administration/configurer.phtml +17 −2 Original line number Diff line number Diff line Loading @@ -64,10 +64,25 @@ <h2 style="margin-bottom: 2rem;">➡ Étape suivante</h2> <form method="post"> <input type="hidden" name="action" value="definir_etape_suivante"> <ul style="list-style-type: none;"> <li> <input type="radio" checked /> <label>Fin du parcours. Générer le document et créer la demande de convention.</label> <input id="type_suite_question" type="radio" name="type_suite" value="etape" <?php if ($conventionModeleEtape->conventionModeleEtapeSuivante): ?>checked<?php endif; ?> /> <label for="type_suite_question">Passer à la question suivante : </label> <select name="question_suivante_id" id="question_suivante_id"> <option value="">-- Choisissez la question --</option> <?php foreach( $conventionModele->etapes as $etape ): ?> <?php if ($etape->id != $conventionModeleEtape->id): ?> <option value="<?= $etape->id ?>" <?php if ($conventionModeleEtape->conventionModeleEtapeSuivante && $conventionModeleEtape->conventionModeleEtapeSuivante->id == $etape->id): ?>selected<?php endif; ?>><?= $etape->nom ?></option> <?php endif; ?> <?php endforeach; ?> </select> </li> <li> <input id="type_fin" type="radio" name="type_suite" value="fin" <?php if (!$conventionModeleEtape->conventionModeleEtapeSuivante): ?>checked<?php endif; ?> /> <label for="type_fin">Fin du parcours. Générer le document et créer la demande de convention.</label> </li> <li><input type="submit" value="💾 Enregistrer"></li> </ul> Loading module/Oscar/view/oscar/convention-modele-instance/afficher.phtml +2 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,9 @@ <div id="demarrer-chemin-decisionnel" class="container"> <div style="background-color: white; padding-left: 4em; padding-bottom: 1em; padding-right: 4em; min-width: 40%;"> <?php if ($conventionModeleInstance->conventionModeleEtapeEnCours == NULL): ?> <h1 style="padding-bottom: 3rem;">Votre demande de convention a bien été enregistrée.</h1> <h1 style="padding-top: 3rem; padding-bottom: 3rem;">Votre demande de convention a bien été enregistrée.</h1> <?php else: ?> <h1 style="padding-bottom: 3rem;"><?= $conventionModeleInstance->conventionModeleEtapeEnCours->titre ?></h1> <h1 style="padding-top: 3rem; padding-bottom: 3rem;"><?= $conventionModeleInstance->conventionModeleEtapeEnCours->titre ?></h1> <form method="post"> <input type="hidden" name="action" value="enregistrer_reponse"> Loading Loading
module/Oscar/src/Oscar/Controller/ConventionModeleEtapeAdministrationController.php +21 −0 Original line number Diff line number Diff line Loading @@ -159,6 +159,27 @@ class ConventionModeleEtapeAdministrationController extends AbstractOscarControl } $za->close(); } else if ($this->params()->fromPost('action') == "definir_etape_suivante") { if ($this->params()->fromPost('type_suite') == "etape") { if (!$this->params()->fromPost('question_suivante_id')) { return $this->getResponseNotFound("Veuillez indiquer l'étape suivante."); } /** @var \Oscar\Entity\ConventionModeleEtape $conventionModeleEtapeSuivante */ $conventionModeleEtapeSuivante = $this->getEntityManager()->find(\Oscar\Entity\ConventionModeleEtape::class, $this->params()->fromPost('question_suivante_id')); if (!$conventionModeleEtapeSuivante) { return $this->getResponseNotFound("L'étape suivante n'a pas été trouvée."); } $conventionModeleEtape->conventionModeleEtapeSuivante = $conventionModeleEtapeSuivante; } else { $conventionModeleEtape->conventionModeleEtapeSuivante = NULL; } $conventionModeleEtape->dateUpdated = new \DateTime(); $conventionModeleEtape->updatedBy = $this->getCurrentPerson(); $this->getEntityManager()->flush(); } return $this->redirect()->toRoute('administration/conventionModeles/configurer/etapes/configurer', ['id' => $conventionModele->id, 'idEtape' => $conventionModeleEtape->id]); Loading
module/Oscar/src/Oscar/Entity/ConventionModeleEtape.php +7 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,13 @@ class ConventionModeleEtape */ public $fichierDateAjout; /** * @var ?ConventionModeletEtape * @ORM\ManyToOne(targetEntity="ConventionModeleEtape") * @ORM\JoinColumn(onDelete="SET NULL") */ public $conventionModeleEtapeSuivante; public function __construct() { $this->dateCreated = new \DateTime(); Loading
module/Oscar/view/oscar/convention-modele-etape-administration/configurer.phtml +17 −2 Original line number Diff line number Diff line Loading @@ -64,10 +64,25 @@ <h2 style="margin-bottom: 2rem;">➡ Étape suivante</h2> <form method="post"> <input type="hidden" name="action" value="definir_etape_suivante"> <ul style="list-style-type: none;"> <li> <input type="radio" checked /> <label>Fin du parcours. Générer le document et créer la demande de convention.</label> <input id="type_suite_question" type="radio" name="type_suite" value="etape" <?php if ($conventionModeleEtape->conventionModeleEtapeSuivante): ?>checked<?php endif; ?> /> <label for="type_suite_question">Passer à la question suivante : </label> <select name="question_suivante_id" id="question_suivante_id"> <option value="">-- Choisissez la question --</option> <?php foreach( $conventionModele->etapes as $etape ): ?> <?php if ($etape->id != $conventionModeleEtape->id): ?> <option value="<?= $etape->id ?>" <?php if ($conventionModeleEtape->conventionModeleEtapeSuivante && $conventionModeleEtape->conventionModeleEtapeSuivante->id == $etape->id): ?>selected<?php endif; ?>><?= $etape->nom ?></option> <?php endif; ?> <?php endforeach; ?> </select> </li> <li> <input id="type_fin" type="radio" name="type_suite" value="fin" <?php if (!$conventionModeleEtape->conventionModeleEtapeSuivante): ?>checked<?php endif; ?> /> <label for="type_fin">Fin du parcours. Générer le document et créer la demande de convention.</label> </li> <li><input type="submit" value="💾 Enregistrer"></li> </ul> Loading
module/Oscar/view/oscar/convention-modele-instance/afficher.phtml +2 −2 Original line number Diff line number Diff line Loading @@ -39,9 +39,9 @@ <div id="demarrer-chemin-decisionnel" class="container"> <div style="background-color: white; padding-left: 4em; padding-bottom: 1em; padding-right: 4em; min-width: 40%;"> <?php if ($conventionModeleInstance->conventionModeleEtapeEnCours == NULL): ?> <h1 style="padding-bottom: 3rem;">Votre demande de convention a bien été enregistrée.</h1> <h1 style="padding-top: 3rem; padding-bottom: 3rem;">Votre demande de convention a bien été enregistrée.</h1> <?php else: ?> <h1 style="padding-bottom: 3rem;"><?= $conventionModeleInstance->conventionModeleEtapeEnCours->titre ?></h1> <h1 style="padding-top: 3rem; padding-bottom: 3rem;"><?= $conventionModeleInstance->conventionModeleEtapeEnCours->titre ?></h1> <form method="post"> <input type="hidden" name="action" value="enregistrer_reponse"> Loading