Commit f3c0eccc authored by Johnny Leveneur's avatar Johnny Leveneur
Browse files

envoie de mail lors de la modification d'une inscription

parent 91333060
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -165,7 +165,20 @@ class InscriptionController extends AbstractActionController
                    and $inscription->getParticipant() !== null and $inscription->getParticipant()->getId() != -1) {
                    if ($this->getEvenementService()->estModifiableInscription($inscription)) {
                        $this->getInscriptionService()->update($inscription);
                        $this->flashMessenger()->addSuccessMessage("Inscription mise à jour.");
                        switch ($inscription->getListe()) {
                            case Inscription::PRINCIPALE :
                                $this->getNotificationService()->triggerListePrincipale($inscription);
                                $this->flashMessenger()->addSuccessMessage("Inscription sur liste principal mise à jour.");
                                break;
                            case Inscription::COMPLEMENTAIRE :
                                $this->getNotificationService()->triggerListeComplementaire($inscription);
                                $this->flashMessenger()->addWarningMessage("Inscription sur liste d'attente mise à jour.");
                                break;
                            default :
                                $this->flashMessenger()->addErrorMessage("Échec du classement de l'inscription.");
                                break;
                        }

                    } else {
                        $this->flashMessenger()->addErrorMessage("Impossible de modifier cette inscription : plus aucune place disponible.");
                    }