ZwiiCampus/module/suscribe/view/edit/edit.php

140 lines
5.3 KiB
PHP
Raw Normal View History

2023-11-03 18:31:35 +01:00
<?php echo template::formOpen('registrationUserEditForm'); ?>
2024-07-17 20:13:53 +02:00
<div class="row">
<div class="col1">
<?php echo template::button('registrationUserEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->geturl(0) . '/users',
'value' => template::ico('left')
]); ?>
2023-11-03 18:31:35 +01:00
</div>
2024-07-17 20:13:53 +02:00
<div class="col2 offset9">
<?php echo template::submit('registrationUserEditSubmit', [
'class' => 'green'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Confirmation de l'inscription</h4>
<div class="row">
<div class="col12">
<div class="row">
<div class="col6">
<?php echo template::text('registrationUserEditFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'firstname']),
'disabled' => true
]); ?>
2023-11-03 18:31:35 +01:00
</div>
2024-07-17 20:13:53 +02:00
<div class="col6">
<?php echo template::text('registrationUserEditLastname', [
'autocomplete' => 'off',
'label' => 'Nom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'lastname']),
'disabled' => true
]); ?>
2023-11-03 18:31:35 +01:00
</div>
2024-07-17 20:13:53 +02:00
</div>
<div class="row">
<div class="col12">
<?php echo template::mail('registrationUserEditMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
'disabled' => true
]); ?>
2023-11-03 18:31:35 +01:00
</div>
</div>
2024-07-17 20:13:53 +02:00
<div class="row">
<div class="col8">
<?php echo template::text('registrationUserState', [
'label' => 'État de l\'inscription',
'value' => $module::$statusGroups[$this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'status'])],
'disabled' => true,
'help' => 'En attente : le mail n\'a pas encore été validé<br>Email validé : approbation nécessaire.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('registrationUsertimer', [
'label' => 'Date de demande',
'value' => helper::dateUTF8(date('Y-m-d G:i'), $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'timer'])),
'disabled' => true
2023-11-03 18:31:35 +01:00
]); ?>
2024-07-17 20:13:53 +02:00
</div>
</div>
</div>
</div>
<div class="row">
2024-07-20 17:33:14 +02:00
<div class="col4">
<?php echo template::text('registrationUserLabel', [
'label' => 'Etiquette'
]); ?>
</div>
<div class="col4">
2024-07-17 20:13:53 +02:00
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::select('registrationUserEditGroup', $module::$groups, [
'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(['module', $this->getUrl(0), 'registrationUsers', $this->getUrl(2), 'status'])
]); ?>
<?php endif; ?>
</div>
2024-07-20 17:33:14 +02:00
<div class="col4">
2024-07-17 20:13:53 +02:00
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div id="registrationUserCommentProfil<?php echo self::GROUP_MEMBER; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_MEMBER, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_MEMBER]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_EDITOR; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_EDITOR, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_EDITOR]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_ADMIN; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_ADMIN, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_ADMIN]),
'readonly' => true,
]);
?>
</div>
2023-11-03 18:31:35 +01:00
</div>
</div>
</div>
</div>
</div>
2024-07-17 20:13:53 +02:00
</div>
2023-11-03 18:31:35 +01:00
<?php echo template::formClose(); ?>