2023-05-11 18:33:25 +02:00
/**
* This file is part of Zwii .
* For full copyright and license information , please see the LICENSE
* file that was distributed with this source code .
*
* @ author Rémi Jean < remi . jean @ outlook . com >
* @ copyright Copyright ( C ) 2008 - 2018 , Rémi Jean
* @ author Frédéric Tempez < frederic . tempez @ outlook . com >
* @ copyright Copyright ( C ) 2018 - 2023 , Frédéric Tempez
* @ license CC Attribution - NonCommercial - NoDerivatives 4.0 International
* @ link http :// zwiicms . fr /
*/
$ ( document ) . ready ( function () {
// Désactive tous les éléments de la classe "filemanager" si le checkbox avec l'id "profilEditFileManager" est décoché au chargement de la page
if ( ! $ ( " #profilAddFileManager " ) . prop ( " checked " )) {
$ ( " .filemanager " ) . prop ( " disabled " , true );
}
// À chaque inversion de l'état du checkbox avec l'id "profilEditFileManager", désactive ou active tous les éléments de la classe "filemanager" en fonction de l'état
$ ( " #profilAddFileManager " ) . change ( function () {
if ( ! $ ( this ) . prop ( " checked " )) {
$ ( " .filemanager " ) . prop ( " disabled " , true );
} else {
$ ( " .filemanager " ) . prop ( " disabled " , false );
}
});
2023-05-21 17:56:18 +02:00
// Désactive la gestion des pages pour les membres
2023-05-31 19:30:39 +02:00
$ ( '#profilAddGroup' ) . change ( function () {;
2023-05-21 17:56:18 +02:00
if ( $ ( this ) . val () === '1' ) {
2023-05-31 20:44:47 +02:00
$ ( '.containerPage, .containerModule' ) . slideUp ();
2023-05-21 17:56:18 +02:00
} else {
2023-05-31 20:44:47 +02:00
$ ( '.containerPage, .containerModule' ) . slideDown ();
2023-05-21 17:56:18 +02:00
}
});
2023-06-01 20:08:11 +02:00
$ ( " #profilAddPageEdit " ) . change ( function () {
if ( ! $ ( this ) . prop ( " checked " )) {
$ ( " .containerModule " ) . prop ( " disabled " , true );
} else {
$ ( " .containerModule " ) . prop ( " disabled " , false );
}
});
2023-05-11 18:33:25 +02:00
});