forked from ZwiiCMS-Team/ZwiiCMS
079 Confirmer supp module
This commit is contained in:
parent
ed807249fe
commit
dfc72060fd
@ -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 = [];
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -45,6 +45,8 @@ echo template::formOpen('pageEditForm');
|
||||
'label' => 'Module',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
|
||||
]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOld',['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOldText',['value' => $module::$moduleNames[$this->getData(['page', $this->getUrl(2), 'moduleId'])] ]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php echo template::button('pageEditModuleConfig', [
|
||||
|
Loading…
Reference in New Issue
Block a user