diff --git a/core/core.php b/core/core.php index 27375046..560a6cdb 100755 --- a/core/core.php +++ b/core/core.php @@ -36,7 +36,7 @@ class common { const THUMBS_WIDTH = 640; // Numéro de version - const ZWII_VERSION = '10.0.078'; + const ZWII_VERSION = '10.0.079'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/module/page/view/edit/edit.js.php b/core/module/page/view/edit/edit.js.php index 4f8c487c..140c2810 100755 --- a/core/module/page/view/edit/edit.js.php +++ b/core/module/page/view/edit/edit.js.php @@ -17,11 +17,25 @@ */ $("#pageEditDelete").on("click", function() { var _this = $(this); - return core.confirm("Êtes-vous sûr de vouloir supprimer cette page ?", function() { + return core.confirm("Confirmez-vous la suppression de cette page ?", function() { $(location).attr("href", _this.attr("href")); }); }); +$("#pageEditSubmit").on("click", function() { + var oldModule = $("#pageEditModuleIdOld").val(); + var oldModuleText = $("#pageEditModuleIdOldText").val(); + var newModule = $("#pageEditModuleId").val(); + if ( oldModule !== "" && + oldModule !== newModule) { + var _this = $(this); + return core.confirm("Les données du module " + oldModuleText + " seront effacées. Confirmez-vous ?", function() { + $(location).attr("href", _this.attr("href")); + }); + } +}); + + /** * Paramètres par défaut au chargement */ diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index 19846a6f..47e06b77 100755 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -45,6 +45,10 @@ echo template::formOpen('pageEditForm'); 'label' => 'Module', 'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId']) ]); ?> + $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?> + $this->getData(['page', $this->getUrl(2), 'moduleId']) !== '' ? $module::$moduleNames[$this->getData(['page', $this->getUrl(2), 'moduleId'])] : '' + ]); ?>