edit.ctp
1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<div class="utilisateurs form">
<?= $this->Form->create($user) ?>
<?php $USE_LDAP = $configuration->use_ldap; ?>
<fieldset>
<h2><i class="icon-edit"></i> Editer un utilisateur privilégié</h2>
<?php
$options = [];
echo $this->Form->input('nom', [
'options' => $options,
'empty' => 'Choisir un utilisateur',
'disabled' => true,
'div' => 'input required']);
$READONLY = $USE_LDAP ? true:false;
echo $this->Form->input('username', [
'label' => 'Login',
'div' => 'input required',
'readonly' => $READONLY]);
if(!$USE_LDAP) {
echo $this->Form->input('password');
}
echo $this->Form->input('email', [
'label' => 'E-mail',
'div' => 'input required',
'readonly' => $READONLY]);
echo $this->Form->input('role', ['label' => 'Rôle',
'options' => ['Super Administrateur' => 'Super Administrateur', 'Administration Plus' => 'Administration Plus', 'Administration' => 'Administration', 'Responsable' => 'Responsable', 'Utilisateur' => 'Utilisateur']
]);
echo $this->Form->input('groupes_metier_id', ['label' => 'Groupe métier', 'options' => $groupesMetiers, 'default' => 1, 'style' => 'width: 100px']);
?>
</fieldset>
<?= $this->Form->submit(__('Valider')) ?>
<?= $this->Form->end() ?>
</div>
<div class="actions">
<?php
echo $this->element('menu');
echo $this->element('menu_form', [ 'pluralHumanName' => 'Utilisateurs' ]);
?>
</div>