pas de gestion des page spour les membres

This commit is contained in:
Fred Tempez 2023-05-21 17:56:18 +02:00
parent 663dfd12ec
commit 81d8eb54d0
5 changed files with 69 additions and 48 deletions

View File

@ -531,7 +531,7 @@ class user extends common
$this->setData([ $this->setData([
'profil', 'profil',
$this->getInput('profilEditGroup'), $this->getInput('profilEditGroup'),
$this->getUrl(3), $this->getInput('profilEditProfil'),
[ [
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true), 'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
'readonly' => false, 'readonly' => false,

View File

@ -15,4 +15,8 @@
/** NE PAS EFFACER /** NE PAS EFFACER
* admin.css * admin.css
*/ */
#containerPage {
display: none;
}

View File

@ -26,4 +26,15 @@ $(document).ready(function () {
$(".filemanager").prop("disabled", false); $(".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();
}
});
}); });

View File

@ -44,7 +44,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" id="containerPage">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4> <h4>

View File

@ -27,11 +27,17 @@
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
<?php echo template::text('profilEditGroup', [ <?php echo template::text('profilEditDisplayGroup', [
'label' => 'Groupe', 'label' => 'Groupe',
'value' => self::$groups[$this->getUrl(2)], 'value' => self::$groups[$this->getUrl(2)],
'disabled' => true 'disabled' => true
]); ?> ]); ?>
<?php echo template::hidden('profilEditGroup', [
'value' => $this->getUrl(2),
]); ?>
<?php echo template::hidden('profilEditProfil', [
'value' => $this->getUrl(3),
]); ?>
</div> </div>
</div> </div>
</div> </div>
@ -45,55 +51,55 @@
</div> </div>
</div> </div>
</div> </div>
<?php if($this->getUrl(2) >= 2): ?> <?php if ($this->getUrl(2) >= self::GROUP_MODERATOR): ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Pages'); ?> <?php echo helper::translate('Pages'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
<?php echo template::checkbox('profilEditPageAdd', true, 'Ajouter', [ <?php echo template::checkbox('profilEditPageAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'add']) 'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'add'])
]); ?> ]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPageEdit', true, 'Editer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'edit'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPageDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'delete'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPageDuplicate', true, 'Dupliquer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'duplicate'])
]); ?>
</div>
</div> </div>
<div class="col3"> <div class="row">
<?php echo template::checkbox('profilEditPageEdit', true, 'Editer', [ <div class="col3">
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'edit']) <?php echo template::checkbox('profilEditPageModule', true, 'Module', [
]); ?> 'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'module'])
</div> ]); ?>
<div class="col3"> </div>
<?php echo template::checkbox('profilEditPageDelete', true, 'Effacer', [ <div class="col3">
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'delete']) <?php echo template::checkbox('profilEditPagecssEditor', true, 'Editeur CSS', [
]); ?> 'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'cssEditor'])
</div> ]); ?>
<div class="col3"> </div>
<?php echo template::checkbox('profilEditPageDuplicate', true, 'Dupliquer', [ <div class="col3">
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'duplicate']) <?php echo template::checkbox('profilEditPagejsEditor', true, 'Editeur JS', [
]); ?> 'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'jsEditor'])
</div> ]); ?>
</div> </div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditPageModule', true, 'Module', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'module'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPagecssEditor', true, 'Editeur CSS', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'cssEditor'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPagejsEditor', true, 'Editeur JS', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'jsEditor'])
]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<?php endif; ?> <?php endif; ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">