diff --git a/core/module/course/course.php b/core/module/course/course.php index 80b7c91..527e15f 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -20,18 +20,18 @@ class course extends common 'swap' => self::GROUP_VISITOR, 'suscribe' => self::GROUP_VISITOR, 'unsuscribe' => self::GROUP_MEMBER, - 'index' => self::GROUP_EDITOR, - 'edit' => self::GROUP_EDITOR, - 'manage' => self::GROUP_EDITOR, + 'index' => self::GROUP_EDITOR, // Fait + 'edit' => self::GROUP_EDITOR, // Fait + 'manage' => self::GROUP_EDITOR, // Fait 'users' => self::GROUP_EDITOR, // fait - 'usersAdd' => self::GROUP_EDITOR, - 'usersDelete' => self::GROUP_EDITOR, + 'usersAdd' => self::GROUP_EDITOR,//Fait + 'usersDelete' => self::GROUP_EDITOR,//Fait 'usersHistoryExport' => self::GROUP_EDITOR, //fait - 'userDelete' => self::GROUP_EDITOR, - 'userHistory' => self::GROUP_EDITOR, - 'userHistoryExport' => self::GROUP_EDITOR, - 'backup' => self::GROUP_EDITOR, - 'restore' => self::GROUP_EDITOR, + 'userDelete' => self::GROUP_EDITOR, //Fait + 'userHistory' => self::GROUP_EDITOR, //Fait + 'userHistoryExport' => self::GROUP_EDITOR, //Fait + 'backup' => self::GROUP_EDITOR, // Fait + 'restore' => self::GROUP_EDITOR, //Fait 'clone' => self::GROUP_ADMIN, 'add' => self::GROUP_ADMIN, 'delete' => self::GROUP_ADMIN, diff --git a/core/module/user/user.php b/core/module/user/user.php index 95576eb..8731801 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -712,6 +712,12 @@ class user extends common 'users' => $this->getInput('profilEditCourseUsers', helper::FILTER_BOOLEAN), 'userHistory' => $this->getInput('profilEditCourseUserHistory', helper::FILTER_BOOLEAN), 'userHistoryExport' => $this->getInput('profilEditCourseUserExport', helper::FILTER_BOOLEAN), + 'userAdd' => $this->getInput('profilEditCourseUserAdd', helper::FILTER_BOOLEAN), + 'userDelete' => $this->getInput('profilEditCourseUserDelete', helper::FILTER_BOOLEAN), + 'usersDelete' => $this->getInput('profilEditCourseUsersDelete', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilEditCourseEdit', helper::FILTER_BOOLEAN), + 'backup' => $this->getInput('profilEditCourseBackup', helper::FILTER_BOOLEAN), + 'restore' => $this->getInput('profilEditCourseRestore', helper::FILTER_BOOLEAN), ] ]; diff --git a/core/module/user/view/profilEdit/profilEdit.js.php b/core/module/user/view/profilEdit/profilEdit.js.php index 21441f7..9147bf9 100644 --- a/core/module/user/view/profilEdit/profilEdit.js.php +++ b/core/module/user/view/profilEdit/profilEdit.js.php @@ -18,6 +18,13 @@ $(document).ready(function () { $(".filemanager").prop("disabled", true); } + // Désactive les éléments liés aux espaces + if (!$("#profilEditCourseIndex").prop("checked")) { + $("#courseContainer").slideUp(); + } else { + $("#courseContainer").slideDown(); + } + // Désactive les éléments liés au blog if (!$("#profilEditBlogComment").prop("checked")) { $(".blogEditCommentOptions").prop("disabled", true); @@ -63,12 +70,22 @@ $(document).ready(function () { } }); + // Gérer l'évènement sur les options des espaces + $("#profilEditCourseIndex").change(function () { + if (!$(this).is(':checked')) { + $('.courseOptions input[type="checkbox"]').prop('checked', false); + $("#courseContainer").slideUp(); + } else { + $("#courseContainer").slideDown(); + } + }); + // Gérer l'évènement sur les commentaires du blog $("#profilEditBlogComment").change(function () { if (!$(this).is(':checked')) { $(".blogEditCommentOptions").slideUp(); } else { - $('.blogEditCommentOptions input[type="checkbox"]').prop('checked', false); + $('.blogEditCommentOptions input[type="checkbox"]').prop("disabled", true); $(".blogEditCommentOptions").slideDown(); } }); diff --git a/core/module/user/view/profilEdit/profilEdit.php b/core/module/user/view/profilEdit/profilEdit.php index d4c8f37..03c8431 100644 --- a/core/module/user/view/profilEdit/profilEdit.php +++ b/core/module/user/view/profilEdit/profilEdit.php @@ -27,9 +27,9 @@ 'label' => 'Nom du profil', 'value' => helper::translate($this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name'])) ]); ?> - -
- +
+ 'Hiérarchie', 'help' => 'Rang 9 > rang 1. Le profil de rang 1 n\'est pas modifiable.', 'selected' => $this->getUrl(3), @@ -92,46 +92,59 @@ ]); ?>
-
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'edit']) - ]); ?> +
+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'edit']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'backup']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'restore']), + ]); ?> +
-
-
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'users']) - ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'users']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistory']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistoryExport']), + ]); ?> +
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistory']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistoryExport']) - ]); ?> -
-
-
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'users']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistory']) - ]); ?> -
-
- $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userHistoryExport']) - ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'userDelete']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'usersAdd']), + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'course', 'usersDelete']), + ]); ?> +
+