From 7b6aa131a7cab4ef8dc49433eca0a6a7e115140d Mon Sep 17 00:00:00 2001 From: Deltacms Date: Wed, 9 Nov 2022 18:45:36 +0100 Subject: [PATCH] gallery pour editeur --- module/gallery/gallery.php | 7 ++++--- module/gallery/view/config/config.php | 4 ++-- module/gallery/view/edit/edit.php | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index a450c23..c4747a2 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -76,8 +76,8 @@ class gallery extends common { // Mettre à jour la version $this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.0' ]); } - if (version_compare($versionData, '4.1', '<') ) { - $this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.1' ]); + if (version_compare($versionData, '4.2', '<') ) { + $this->setData(['module',$this->getUrl(0),'config', 'versionData', '4.2' ]); } } @@ -267,7 +267,8 @@ class gallery extends common { template::button('galleryConfigDelete' . $galleryId, [ 'class' => 'galleryConfigDelete buttonRed', 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $galleryId . '/' . $_SESSION['csrf'], - 'value' => template::ico('cancel') + 'value' => template::ico('cancel'), + 'disabled' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true ]) ]; // Tableau des id des galleries pour le drag and drop diff --git a/module/gallery/view/config/config.php b/module/gallery/view/config/config.php index 52ba42b..53f17a8 100644 --- a/module/gallery/view/config/config.php +++ b/module/gallery/view/config/config.php @@ -13,10 +13,10 @@ echo template::formOpen('galleryConfigForm'); ?> 'value' => $text['gallery_view']['config'][0] ]); ?> -
+
helper::baseUrl() . $this->getUrl(0) . '/theme/' . $_SESSION['csrf'], - 'value' => template::ico('brush','right') . $text['gallery_view']['config'][1] + 'value' => template::ico('brush','right') . $text['gallery_view']['config'][1], ]); ?>
diff --git a/module/gallery/view/edit/edit.php b/module/gallery/view/edit/edit.php index fef2ea0..a436b50 100644 --- a/module/gallery/view/edit/edit.php +++ b/module/gallery/view/edit/edit.php @@ -27,17 +27,18 @@ echo template::formOpen('galleryEditForm'); ?>
$text['gallery_view']['edit'][3], - 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']) + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']), + 'readonly' => $this->getUser('group') >= self::GROUP_MODERATOR ? false : true ]); ?>
-
+
$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']), 'noDirty' => true // Désactivé à cause des modifications en ajax ]); ?> $text['gallery_view']['edit'][4], - 'noDirty' => true // Désactivé à cause des modifications en ajax + 'noDirty' => true, // Désactivé à cause des modifications en ajax ]); ?>