2022-03-06 13:35:21 +01:00
|
|
|
<?php echo template::formOpen('userEditForm');
|
|
|
|
// Lexique
|
2022-09-11 09:42:42 +02:00
|
|
|
include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_user.php');
|
2022-03-06 13:35:21 +01:00
|
|
|
?>
|
2022-01-31 09:10:49 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col2">
|
|
|
|
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
|
|
|
|
<?php echo template::button('userEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl() . 'user',
|
|
|
|
'ico' => 'left',
|
2022-09-11 09:42:42 +02:00
|
|
|
'value' => $text['core_user_view']['edit'][0]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php echo template::button('userEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl(false),
|
|
|
|
'ico' => 'home',
|
2022-09-11 09:42:42 +02:00
|
|
|
'value' => $text['core_user_view']['edit'][0]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="col2 offset8">
|
2022-03-06 13:35:21 +01:00
|
|
|
<?php echo template::submit('userEditSubmit', [
|
2022-09-11 09:42:42 +02:00
|
|
|
'value'=> $text['core_user_view']['edit'][29]
|
2022-03-06 13:35:21 +01:00
|
|
|
]); ?>
|
2022-01-31 09:10:49 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<div class="block">
|
2022-09-11 09:42:42 +02:00
|
|
|
<h4><?php echo $text['core_user_view']['edit'][13]; ?></h4>
|
2022-01-31 09:10:49 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('userEditFirstname', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][2],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('userEditLastname', [
|
|
|
|
'autocomplete' => 'off',
|
|
|
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][3],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php echo template::text('userEditPseudo', [
|
|
|
|
'autocomplete' => 'off',
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][4],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'pseudo'])
|
|
|
|
]); ?>
|
2022-03-06 13:35:21 +01:00
|
|
|
<?php echo template::select('userEditSignature', $signature, [
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][5],
|
2022-01-31 09:10:49 +01:00
|
|
|
'selected' => $this->getData(['user', $this->getUrl(2), 'signature'])
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::mail('userEditMail', [
|
|
|
|
'autocomplete' => 'off',
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][6],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['user', $this->getUrl(2), 'mail'])
|
|
|
|
]); ?>
|
|
|
|
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
|
2022-03-06 13:35:21 +01:00
|
|
|
<?php echo template::select('userEditGroup', $groupEdits, [
|
2022-01-31 09:10:49 +01:00
|
|
|
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
|
2022-09-11 09:42:42 +02:00
|
|
|
'help' => ($this->getUrl(2) === $this->getUser('id') ? $text['core_user_view']['edit'][30] : ''),
|
|
|
|
'label' => $text['core_user_view']['edit'][7],
|
2022-01-31 09:10:49 +01:00
|
|
|
'selected' => $this->getData(['user', $this->getUrl(2), 'group'])
|
|
|
|
]); ?>
|
|
|
|
<div id="userEditMemberFiles" class="displayNone">
|
2022-09-11 09:42:42 +02:00
|
|
|
<?php echo template::checkbox('userEditFiles', true, $text['core_user_view']['edit'][8], [
|
2022-01-31 09:10:49 +01:00
|
|
|
'checked' => $this->getData(['user', $this->getUrl(2), 'files']),
|
2022-09-11 09:42:42 +02:00
|
|
|
'help' => $text['core_user_view']['edit'][9]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
</div>
|
2022-09-11 09:42:42 +02:00
|
|
|
<div id="userEditLabelAuth"><?php echo $text['core_user_view']['edit'][10]; ?></div>
|
2022-01-31 09:10:49 +01:00
|
|
|
<ul id="userEditGroupDescription<?php echo self::GROUP_MEMBER; ?>" class="userEditGroupDescription displayNone">
|
2022-09-11 09:42:42 +02:00
|
|
|
<li><?php echo $text['core_user_view']['edit'][11]; ?></li>
|
2022-01-31 09:10:49 +01:00
|
|
|
</ul>
|
|
|
|
<ul id="userEditGroupDescription<?php echo self::GROUP_MODERATOR; ?>" class="userEditGroupDescription displayNone">
|
2022-09-11 09:42:42 +02:00
|
|
|
<li><?php echo $text['core_user_view']['edit'][12]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][14]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][15]; ?></li>
|
2022-01-31 09:10:49 +01:00
|
|
|
</ul>
|
|
|
|
<ul id="userEditGroupDescription<?php echo self::GROUP_ADMIN; ?>" class="userEditGroupDescription displayNone">
|
2022-09-11 09:42:42 +02:00
|
|
|
<li><?php echo $text['core_user_view']['edit'][16]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][14]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][15]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][17]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][18]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][19]; ?></li>
|
|
|
|
<li><?php echo $text['core_user_view']['edit'][20]; ?></li>
|
2022-01-31 09:10:49 +01:00
|
|
|
</ul>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col6">
|
|
|
|
<div class="block">
|
2022-09-11 09:42:42 +02:00
|
|
|
<h4><?php echo $text['core_user_view']['edit'][21]; ?></h4>
|
2022-01-31 09:10:49 +01:00
|
|
|
<?php echo template::text('userEditId', [
|
|
|
|
'autocomplete' => 'off',
|
2022-09-11 09:42:42 +02:00
|
|
|
'help' => $text['core_user_view']['edit'][31],
|
|
|
|
'label' => $text['core_user_view']['edit'][22],
|
2022-01-31 09:10:49 +01:00
|
|
|
'readonly' => true,
|
|
|
|
'value' => $this->getUrl(2)
|
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditOldPassword', [
|
|
|
|
'autocomplete' => 'new-password', // remplace 'off' pour éviter le pré remplissage auto
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][23]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditNewPassword', [
|
|
|
|
'autocomplete' => 'off',
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][32]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
<?php echo template::password('userEditConfirmPassword', [
|
|
|
|
'autocomplete' => 'off',
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][24]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="block">
|
2022-09-11 09:42:42 +02:00
|
|
|
<h4><?php echo $text['core_user_view']['edit'][26]; ?></h4>
|
2022-01-31 09:10:49 +01:00
|
|
|
<?php echo template::select('userRedirectPageId', helper::arrayCollumn($module::$pagesList, 'title'), [
|
2022-09-11 09:42:42 +02:00
|
|
|
'label' => $text['core_user_view']['edit'][27],
|
2022-01-31 09:10:49 +01:00
|
|
|
'selected' =>$this->getData(['user', $this->getUrl(2),'redirectPageId']),
|
2022-09-11 09:42:42 +02:00
|
|
|
'help' => $text['core_user_view']['edit'][28]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php echo template::formClose(); ?>
|