Filtrage page depuis moderateur

Groupe fixe en édition
This commit is contained in:
Fred Tempez 2023-05-21 17:38:38 +02:00
parent 9c44759f96
commit 663dfd12ec
2 changed files with 8 additions and 14 deletions

View File

@ -527,18 +527,11 @@ class user extends common
// Soumission du formulaire // Soumission du formulaire
if ($this->isPost()) { if ($this->isPost()) {
$oldGroup = $this->getUrl(2);
$group = $this->getInput('profilEditGroup');
$profil = $this->getUrl(3);
// Changement de groupe, effacer le profil de l'ancien groupe et incrément le profil
if ($oldGroup !== $group) {
$this->deleteData(['profil', $oldGroup, $profil]);
$profil = helper::increment($profil, $this->getData(['profil', $group]));
}
$this->setData([ $this->setData([
'profil', 'profil',
$group, $this->getInput('profilEditGroup'),
$profil, $this->getUrl(3),
[ [
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true), 'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
'readonly' => false, 'readonly' => false,

View File

@ -27,9 +27,10 @@
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
<?php echo template::select('profilEditGroup', $module::$groupProfils, [ <?php echo template::text('profilEditGroup', [
'label' => 'Groupe', 'label' => 'Groupe',
'selected' => $this->getUrl(2) 'value' => self::$groups[$this->getUrl(2)],
'disabled' => true
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -44,7 +45,7 @@
</div> </div>
</div> </div>
</div> </div>
<?php if($this->getUrl(2) >= 2): ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
@ -93,7 +94,7 @@
</div> </div>
</div> </div>
</div> </div>
<?php endif; ?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">