From 81d8eb54d03b3fad841de272cb0fb34a7532f889 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 21 May 2023 17:56:18 +0200 Subject: [PATCH] pas de gestion des page spour les membres --- core/module/user/user.php | 2 +- core/module/user/view/profilAdd/profilAdd.css | 6 +- .../user/view/profilAdd/profilAdd.js.php | 11 +++ core/module/user/view/profilAdd/profilAdd.php | 2 +- .../user/view/profilEdit/profilEdit.php | 96 ++++++++++--------- 5 files changed, 69 insertions(+), 48 deletions(-) diff --git a/core/module/user/user.php b/core/module/user/user.php index 74632a52..109b4545 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -531,7 +531,7 @@ class user extends common $this->setData([ 'profil', $this->getInput('profilEditGroup'), - $this->getUrl(3), + $this->getInput('profilEditProfil'), [ 'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true), 'readonly' => false, diff --git a/core/module/user/view/profilAdd/profilAdd.css b/core/module/user/view/profilAdd/profilAdd.css index ec846297..18c1858e 100644 --- a/core/module/user/view/profilAdd/profilAdd.css +++ b/core/module/user/view/profilAdd/profilAdd.css @@ -15,4 +15,8 @@ /** NE PAS EFFACER * admin.css -*/ \ No newline at end of file +*/ + +#containerPage { + display: none; +} \ No newline at end of file diff --git a/core/module/user/view/profilAdd/profilAdd.js.php b/core/module/user/view/profilAdd/profilAdd.js.php index e08a61d1..7b84ecd3 100644 --- a/core/module/user/view/profilAdd/profilAdd.js.php +++ b/core/module/user/view/profilAdd/profilAdd.js.php @@ -26,4 +26,15 @@ $(document).ready(function () { $(".filemanager").prop("disabled", false); } }); + + // Désactive la gestion des pages pour les membres + $('#profilAddGroup').change(function() { + console.log($(this).val()); + if ($(this).val() === '1') { + $('#containerPage').slideUp(); + } else { + $('#containerPage').slideDown(); + } + }); + }); diff --git a/core/module/user/view/profilAdd/profilAdd.php b/core/module/user/view/profilAdd/profilAdd.php index 8c3326e3..2b3be40d 100644 --- a/core/module/user/view/profilAdd/profilAdd.php +++ b/core/module/user/view/profilAdd/profilAdd.php @@ -44,7 +44,7 @@ -
+

diff --git a/core/module/user/view/profilEdit/profilEdit.php b/core/module/user/view/profilEdit/profilEdit.php index 858effae..f98702ae 100644 --- a/core/module/user/view/profilEdit/profilEdit.php +++ b/core/module/user/view/profilEdit/profilEdit.php @@ -27,11 +27,17 @@ ]); ?>

- 'Groupe', 'value' => self::$groups[$this->getUrl(2)], 'disabled' => true ]); ?> + $this->getUrl(2), + ]); ?> + $this->getUrl(3), + ]); ?>
@@ -45,55 +51,55 @@
-getUrl(2) >= 2): ?> -
-
-
-

- -

-
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'add']) - ]); ?> +getUrl(2) >= self::GROUP_MODERATOR): ?> +
+
+
+

+ +

+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'add']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'edit']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'delete']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'duplicate']) + ]); ?> +
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'edit']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'delete']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'duplicate']) - ]); ?> -
-
-
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'module']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'cssEditor']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'jsEditor']) - ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'module']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'cssEditor']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'jsEditor']) + ]); ?> +
-