diff --git a/module/Application/src/Application/Controller/StructureConcreteController.php b/module/Application/src/Application/Controller/StructureConcreteController.php index 9a8babe8118256383a0a0679c8bd0423a7c819c1..729a28bc594a7dc7d94692674ae72deeb90befbb 100644 --- a/module/Application/src/Application/Controller/StructureConcreteController.php +++ b/module/Application/src/Application/Controller/StructureConcreteController.php @@ -160,28 +160,24 @@ abstract class StructureConcreteController extends AbstractController $data = $request->getPost()->toArray(); $file = $request->getFiles()->toArray(); - // action d'affacement du logo - if (isset($data['supprimer-logo'])) { - $this->supprimerLogoStructure(); - - return $this->redirect()->toRoute($this->routeName, [], ['query' => ['selected' => $structureId], "fragment" => $structureId], true); - } - // action de modification + $cheminLogo = $structureConcrete->getCheminLogo(); $this->structureForm->setData($data); if ($this->structureForm->isValid()) { // sauvegarde du logo si fourni if ($file['cheminLogo']['tmp_name'] !== '') { $this->ajouterLogoStructure($file['cheminLogo']['tmp_name']); + } else { + $structureConcrete->setCheminLogo($cheminLogo); } // mise à jour des données relatives aux structures $structureConcrete = $this->structureForm->getData(); $this->getStructureConcreteService()->update($structureConcrete); $this->flashMessenger()->addSuccessMessage("Structure '$structureConcrete' modifiée avec succès"); - - return $this->redirect()->toRoute($this->routeName, [], ['query' => ['selected' => $structureId], "fragment" => "" . $structureId], true); + $test = $this->routeName .'/information'; + return $this->redirect()->toRoute($this->routeName.'/information', ['structure' => $structureId], [], true); } $this->flashMessenger()->addErrorMessage("Echec de la mise à jour : données incorrectes saissie"); diff --git a/module/Application/view/application/ecole-doctorale/information.phtml b/module/Application/view/application/ecole-doctorale/information.phtml index cb34f5d4caa59be74ef1297e6ffd7cef1bab6550..5fac43e9e90ed2029f0b9657203b70504822af65 100644 --- a/module/Application/view/application/ecole-doctorale/information.phtml +++ b/module/Application/view/application/ecole-doctorale/information.phtml @@ -23,6 +23,8 @@ $canAddRole = $canEdit; École doctorale « <?php echo $ecole->getLibelle(); ?> » </h1> +<?php echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace() ?> + <div> <h2> Informations générales diff --git a/module/Application/view/application/etablissement/information.phtml b/module/Application/view/application/etablissement/information.phtml index 562706fafe249cfee74480bd3c8406cd4152acd7..8a8ee30ba345ecffa58def70897b4566026987e4 100644 --- a/module/Application/view/application/etablissement/information.phtml +++ b/module/Application/view/application/etablissement/information.phtml @@ -22,6 +22,8 @@ $canAddRole = true; Details de l'établissement [ <?php echo $etablissement->getLibelle(); ?> ] </h1> +<?php echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace() ?> + <a href="<?php echo $this->url('etablissement', [], [], true); ?>" class="btn btn-primary action" > diff --git a/module/Application/view/application/unite-recherche/information.phtml b/module/Application/view/application/unite-recherche/information.phtml index d805cb32e30e1dd4a7498b3a98c1ce23b5be2881..6bfc2968b42f4daf83cadbd203ba9d957ab92c91 100644 --- a/module/Application/view/application/unite-recherche/information.phtml +++ b/module/Application/view/application/unite-recherche/information.phtml @@ -25,6 +25,7 @@ $canAddRole = $canEdit; Unité de recherche « <?php echo $unite->getLibelle(); ?> » </h1> +<?php echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace() ?> <h2> Informations générales