2018-04-02 08:29:19 +02:00
|
|
|
<?php echo template::formOpen('userEditForm'); ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col1">
|
2023-03-10 16:49:49 +01:00
|
|
|
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
<?php echo template::button('userEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl() . 'user',
|
|
|
|
'value' => template::ico('left')
|
|
|
|
]); ?>
|
2023-03-10 16:49:49 +01:00
|
|
|
<?php else: ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
<?php echo template::button('userEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl(false),
|
|
|
|
'value' => template::ico('home')
|
|
|
|
]); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="col2 offset9">
|
|
|
|
<?php echo template::submit('userEditSubmit'); ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
2022-09-29 08:45:59 +02:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<div class="block">
|
2023-03-10 16:49:49 +01:00
|
|
|
<h4>
|
|
|
|
<?php echo helper::translate('Identité'); ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
</h4>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('userEditFirstname', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
|
|
|
'label' => 'Prénom',
|
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
|
|
|
]); ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
2022-09-29 08:45:59 +02:00
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('userEditLastname', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
|
|
|
'label' => 'Nom',
|
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
2018-04-02 08:29:19 +02:00
|
|
|
]); ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
</div>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
2023-05-02 23:37:51 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('userEditPseudo', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'label' => 'Pseudo',
|
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'pseudo'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::select('userEditSignature', $module::$signature, [
|
|
|
|
'label' => 'Signature',
|
|
|
|
'selected' => $this->getData(['user', $this->getUrl(2), 'signature'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-29 08:45:59 +02:00
|
|
|
<?php echo template::mail('userEditMail', [
|
|
|
|
'autocomplete' => 'off',
|
2023-02-14 09:34:18 +01:00
|
|
|
'label' => 'Adresse électronique',
|
2022-09-29 08:45:59 +02:00
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'mail'])
|
|
|
|
]); ?>
|
2023-05-02 23:37:51 +02:00
|
|
|
<?php echo template::select('userEditLanguage', $module::$languagesInstalled, [
|
|
|
|
'label' => 'Langue',
|
|
|
|
'selected' => $this->getData(['user', $this->getUser('id'), 'language'])
|
|
|
|
]); ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col6">
|
|
|
|
<div class="block">
|
2023-03-10 16:49:49 +01:00
|
|
|
<h4>
|
|
|
|
<?php echo helper::translate('Authentification'); ?>
|
2022-09-29 08:45:59 +02:00
|
|
|
</h4>
|
|
|
|
<?php echo template::text('userEditId', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'help' => 'L\'identifiant est défini lors de la création du compte, il ne peut pas être modifié.',
|
|
|
|
'label' => 'Identifiant',
|
|
|
|
'readonly' => true,
|
|
|
|
'value' => $this->getUrl(2)
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditOldPassword', [
|
2023-03-10 16:49:49 +01:00
|
|
|
'autocomplete' => 'new-password',
|
|
|
|
// remplace 'off' pour éviter le pré remplissage auto
|
2022-09-29 08:45:59 +02:00
|
|
|
'label' => 'Ancien mot de passe'
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditNewPassword', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'label' => 'Nouveau mot de passe'
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditConfirmPassword', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'label' => 'Confirmation'
|
|
|
|
]); ?>
|
2018-04-02 08:29:19 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-29 08:45:59 +02:00
|
|
|
</div>
|
2022-10-20 20:29:00 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
2023-03-10 16:49:49 +01:00
|
|
|
<h4>
|
2023-05-02 23:37:51 +02:00
|
|
|
<?php echo helper::translate('Permissions'); ?>
|
2022-10-20 20:29:00 +02:00
|
|
|
</h4>
|
|
|
|
<div class="row">
|
2023-03-10 16:49:49 +01:00
|
|
|
<div class="col6">
|
|
|
|
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
|
|
|
|
<?php echo template::select('userEditGroup', self::$groupEdits, [
|
|
|
|
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
|
|
|
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
|
|
|
|
'label' => 'Groupe',
|
|
|
|
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
2022-10-20 20:29:00 +02:00
|
|
|
]); ?>
|
2023-05-02 23:37:51 +02:00
|
|
|
<?php if ($this->getData(['user', $this->getUrl(2), 'group']) === self::GROUP_MEMBER): ?>
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::select('userEditProfil', $module::$userProfils[self::GROUP_MEMBER], [
|
|
|
|
'label' => 'Profil',
|
|
|
|
'selected' => $this->getData(['user', $this->getUser('id'), 'profil'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->getData(['user', $this->getUrl(2), 'group']) === self::GROUP_MEMBER): ?>
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::select('userEditProfil', $module::$userProfils[self::GROUP_MODERATOR], [
|
|
|
|
'label' => 'Profil',
|
|
|
|
'selected' => $this->getData(['user', $this->getUser('id'), 'profil'])
|
|
|
|
]); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
2023-03-10 16:49:49 +01:00
|
|
|
</div>
|
2022-10-20 20:29:00 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-09-29 08:45:59 +02:00
|
|
|
<?php echo template::formClose(); ?>
|