Add profil
This commit is contained in:
parent
f2636c87d8
commit
ab46dd9ab2
@ -595,11 +595,14 @@ class user extends common
|
||||
{
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
// Nombre de profils de ce groupe
|
||||
$group = $this->getInput('profilAddGroup');
|
||||
$profil = (string) (count($this->getData(['profil', $group])) + 1);
|
||||
// Sauvegarder les données
|
||||
$this->setData([
|
||||
'profil',
|
||||
$this->getInput('profilAddGroup'),
|
||||
$this->getInput('profilAddProfil'),
|
||||
$group,
|
||||
$profil,
|
||||
[
|
||||
'name' => $this->getInput('profilAddName', helper::FILTER_STRING_SHORT, true),
|
||||
'readonly' => false,
|
||||
|
@ -21,13 +21,13 @@
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::text('profilEditName', [
|
||||
<?php echo template::text('profilAddName', [
|
||||
'label' => 'Nom du profil',
|
||||
'value' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::select('profilEditGroup', $module::$groupProfils, [
|
||||
<?php echo template::select('profilAddGroup', $module::$groupProfils, [
|
||||
'label' => 'Groupe',
|
||||
'selected' => $this->getUrl(2)
|
||||
]); ?>
|
||||
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::textarea('profilEditComment', [
|
||||
<?php echo template::textarea('profilAddComment', [
|
||||
'label' => 'Commentaire',
|
||||
'value' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'comment'])
|
||||
]); ?>
|
||||
|
Loading…
Reference in New Issue
Block a user