diff --git a/core/module/install/ressource/i18n/en_EN.json b/core/module/install/ressource/i18n/en_EN.json index 99752f14..89ffc6e3 100644 --- a/core/module/install/ressource/i18n/en_EN.json +++ b/core/module/install/ressource/i18n/en_EN.json @@ -475,7 +475,7 @@ "Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Remember to delete your browser's cache if the favicon does not change.", "Permission": "Permission", "Permission et référencement": "Permission and SEO", - "Permissions sur le module": "Module Permissions", + "Permissions": "Permissions", "Permissions sur les dossiers": "Folder Permissions", "Permissions sur les fichiers": "File Permissions", "Permissions sur les pages": "Page Permissions", diff --git a/core/module/install/ressource/i18n/es.json b/core/module/install/ressource/i18n/es.json index 74509d21..a005df5a 100644 --- a/core/module/install/ressource/i18n/es.json +++ b/core/module/install/ressource/i18n/es.json @@ -475,7 +475,7 @@ "Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "Recuerde eliminar el caché de su navegador si el favicon no cambia.", "Permission": "Permiso", "Permission et référencement": "Permiso y referenciación", - "Permissions sur le module": "Permisos del módulo", + "Permissions": "Permisos", "Permissions sur les dossiers": "Permisos de las carpetas", "Permissions sur les fichiers": "Permisos de los archivos", "Permissions sur les pages": "Permisos de las páginas", diff --git a/core/module/install/ressource/i18n/fr_FR.json b/core/module/install/ressource/i18n/fr_FR.json index a17b5974..36f0147e 100644 --- a/core/module/install/ressource/i18n/fr_FR.json +++ b/core/module/install/ressource/i18n/fr_FR.json @@ -475,7 +475,7 @@ "Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.": "", "Permission": "", "Permission et référencement": "", - "Permissions sur le module": "", + "Permissions": "", "Permissions sur les dossiers": "", "Permissions sur les fichiers": "", "Permissions sur les pages": "", diff --git a/core/module/user/view/profilAdd/profilAdd.js.php b/core/module/user/view/profilAdd/profilAdd.js.php index 87809556..69783306 100644 --- a/core/module/user/view/profilAdd/profilAdd.js.php +++ b/core/module/user/view/profilAdd/profilAdd.js.php @@ -14,6 +14,30 @@ $(document).ready(function () { + // Désactive les éléments liés au blog + if (!$("#profilAddBlogComment").prop("checked")) { + $(".blogAddCommentOptions").prop("disabled", true); + $(".blogAddCommentOptions").slideUp(); + } else { + $(".blogAddCommentOptions").slideDown(); + } + + // Désactive les éléments liés au blog + if (!$("#profilAddDownloadComment").prop("checked")) { + $(".downloadAddCommentOptions").prop("disabled", true); + $(".downloadAddCommentOptions").slideUp(); + } else { + $(".downloadAddCommentOptions").slideDown(); + } + + // Désactive les éléments liés au blog + if (!$("#profilAddDownloadCategories").prop("checked")) { + $(".downloadAddCategoryOptions").prop("disabled", true); + $(".downloadAddCategoryOptions").slideUp(); + } else { + $(".downloadAddCategoryOptions").slideDown(); + } + // À chaque inversion de l'état du checkbox avec l'id "profilAddFileManager", désactive ou active tous les éléments de la classe "filemanager" en fonction de l'état $("#profilAddFileManager").change(function () { @@ -34,12 +58,42 @@ $(document).ready(function () { } }); + // Gérer l'évènement sur les commentaires du blog + $("#profilAddBlogComment").change(function () { + if (!$(this).is(':checked')) { + $(".blogAddCommentOptions").slideUp(); + } else { + $('.blogAddCommentOptions input[type="checkbox"]').prop('checked', false); + $(".blogAddCommentOptions").slideDown(); + } + }); + + // Gérer l'évènement sur les commentaires du blog + $("#profilAddDownloadComment").change(function () { + if (!$(this).is(':checked')) { + $(".downloadAddCommentOptions").slideUp(); + } else { + $('.downloadAddCommentOptions input[type="checkbox"]').prop('checked', false); + $(".downloadAddCommentOptions").slideDown(); + } + }); + + // Gérer l'évènement sur les commentaires du blog + $("#profilAddDownloadCategories").change(function () { + if (!$(this).is(':checked')) { + $(".downloadAddCategoryOptions").slideUp(); + } else { + $('.downloadAddCategoryOptions input[type="checkbox"]').prop('checked', false); + $(".downloadAddCategoryOptions").slideDown(); + } + }); + // Gérer l'évènement affichage des $("#profilAddPageModule").change(function () { if (!$(this).is(':checked')) { $(".containerModule").slideUp(); // Décocher les checkboxes dans la classe .containerModule - $('.containerModule input[type="checkbox"]').removeAttr('checked'); + $('.containerModule input[type="checkbox"]').prop('checked', false); } else { $(".containerModule").slideDown(); } @@ -55,7 +109,7 @@ $(document).ready(function () { $('#profilAddPageModule, #profilAddPagecssEditor, #profilAddPagejsEditor').prop('checked', false).prop('disabled', true); // Désactiver les modules et tout décocher $(".containerModule").slideUp(); - $('.containerModule input[type="checkbox"]').removeAttr('checked'); + $('.containerModule input[type="checkbox"]').prop('checked', false); } }); diff --git a/core/module/user/view/profilEdit/profilEdit.js.php b/core/module/user/view/profilEdit/profilEdit.js.php index aa9e3334..ea3d01e6 100644 --- a/core/module/user/view/profilEdit/profilEdit.js.php +++ b/core/module/user/view/profilEdit/profilEdit.js.php @@ -17,6 +17,29 @@ $(document).ready(function () { if (!$("#profilEditFileManager").prop("checked")) { $(".filemanager").prop("disabled", true); } + + // Désactive les éléments liés au blog + if (!$("#profilEditBlogComment").prop("checked")) { + $(".blogEditCommentOptions").prop("disabled", true); + $(".blogEditCommentOptions").slideUp(); + } else { + $(".blogEditCommentOptions").slideDown(); + } + // Désactive les éléments liés à download + if (!$("#profilEditDownloadComment").prop("checked")) { + $(".downloadEditCommentOptions").prop("disabled", true); + $(".downloadEditCommentOptions").slideUp(); + } else { + $(".downloadEditCommentOptions").slideDown(); + } + // Désactive les éléments liés à download + if (!$("#profilEditDownloadCategories").prop("checked")) { + $(".downloadEditCategoryOptions").prop("disabled", true); + $(".downloadEditCategoryOptions").slideUp(); + } else { + $(".downloadEditCategoryOptions").slideDown(); + } + // Vérifier l'état initial de la checkbox #profilEditPageEdit if ($('#profilEditPageEdit').is(':checked')) { // Activer les autres checkboxes @@ -40,12 +63,42 @@ $(document).ready(function () { } }); + // 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").slideDown(); + } + }); + + // Gérer l'évènement sur les commentaires du download + $("#profilEditDownloadComment").change(function () { + if (!$(this).is(':checked')) { + $(".downloadEditCommentOptions").slideUp(); + } else { + $('.downloadEditCommentOptions input[type="checkbox"]').prop('checked', false); + $(".downloadEditCommentOptions").slideDown(); + } + }); + + // Gérer l'évènement sur les commentaires du download + $("#profilEditDownloadCategories").change(function () { + if (!$(this).is(':checked')) { + $(".downloadEditCategoryOptions").slideUp(); + } else { + $('.downloadEditCategoryOptions input[type="checkbox"]').prop('checked', false); + $(".downloadEditCategoryOptions").slideDown(); + } + }); + // Gérer l'évènement affichage des $("#profilEditPageModule").change(function () { if (!$(this).is(':checked')) { $(".containerModule").slideUp(); // Décocher les checkboxes dans la classe .containerModule - $('.containerModule input[type="checkbox"]').removeAttr('checked'); + $('.containerModule input[type="checkbox"]').prop('checked', false); } else { $(".containerModule").slideDown(); } @@ -61,7 +114,7 @@ $(document).ready(function () { $('#profilEditPageModule, #profilEditPagecssEditor, #profilEditPagejsEditor').prop('checked', false).prop('disabled', true); // Désactiver les modules et tout décocher $(".containerModule").slideUp(); - $('.containerModule input[type="checkbox"]').removeAttr('checked'); + $('.containerModule input[type="checkbox"]').prop('checked', false); } }); diff --git a/module/blog/profil/view/add.inc.php b/module/blog/profil/view/add.inc.php index 622d64dd..0f0bed9b 100644 --- a/module/blog/profil/view/add.inc.php +++ b/module/blog/profil/view/add.inc.php @@ -2,7 +2,7 @@