diff --git a/core/module/user/view/edit/edit.js.php b/core/module/user/view/edit/edit.js.php index b96d9d49..93909931 100644 --- a/core/module/user/view/edit/edit.js.php +++ b/core/module/user/view/edit/edit.js.php @@ -14,7 +14,9 @@ $(document).ready(function () { $(".userEditGroupProfil").hide(); + $(".userCommentProfil").hide(); $("#userEditGroupProfil" + $("#userEditGroup").val()).show(); + $("#userCommentProfil" + $("#userEditGroup").val()).show(); $("#userEditGroup").on("change", function () { $(".userEditGroupProfil").hide(); diff --git a/core/module/user/view/edit/edit.php b/core/module/user/view/edit/edit.php index fb4035e5..b5f4983d 100644 --- a/core/module/user/view/edit/edit.php +++ b/core/module/user/view/edit/edit.php @@ -110,7 +110,7 @@ 'disabled' => ($this->getUrl(2) === $this->getUser('id')), 'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''), 'label' => 'Groupe', - 'selected' => $this->getData(['user', $this->getUrl(2), 'group']) + 'selected' => $this->getData(['user', $this->getUrl(2), 'group']), ]); ?> @@ -119,36 +119,47 @@ id="userEditGroupProfil"> 'Profil', - 'selected' => $this->getData(['user', $this->getUrl(2), 'profil']) + 'selected' => $this->getData(['user', $this->getUrl(2), 'profil']), + 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN, ]); ?>
'Profil', - 'selected' => $this->getData(['user', $this->getUrl(2), 'profil']) + 'selected' => $this->getData(['user', $this->getUrl(2), 'profil']), + 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN, ]); ?>
-
- implode("\n",$module::$userProfilsComments[self::GROUP_MEMBER]) - ]); - ?> -
-
- implode("\n",$module::$userProfilsComments[self::GROUP_EDITOR]) - ]); - ?> -
-
- implode("\n",$module::$userProfilsComments[self::GROUP_ADMIN]) - ]); - ?> +
+
+ implode("\n", $module::$userProfilsComments[self::GROUP_MEMBER]), + 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN, + ]); + ?> +
+
+ implode("\n", $module::$userProfilsComments[self::GROUP_EDITOR]), + 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN, + ]); + ?> +
+
+ 'Commentaire', + "value" => implode("\n", $module::$userProfilsComments[self::GROUP_ADMIN]), + 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN, + ]); + ?> +