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