123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?php
- global $myUser, $myFirm;
- if (!$myUser->connected()) throw new Exception("Vous devez être connecté pour accéder à la page");
- ?>
- <div id="user-form" class="user-form">
- <br>
- <h3><?php echo $myUser->fullName(); ?> <small class="text-muted">(<?php echo $myUser->login; ?>)</small></h3>
- <hr>
- <div class="row">
- <div class="col-md-6">
- <label for="avatar">Photo :</label><br/>
- <input id="avatar" data-type="image" name="avatar" class="form-control-file" value="<?php echo $myUser->getAvatar(); ?>" type="file" data-delete="account_avatar_delete(this)" data-default-src="img/default-avatar.png">
- </div>
- <div class="col-md-6">
- <div class="user-ranks">
- <label for="rank">Rangs :</label><br>
- <small class="text-muted">
- <?php
- $ranks = array();
- if($myUser->superadmin == 1) {
- $ranks = array('Super Admin');
- } else {
- foreach($myUser->ranks[$myFirm->id] as $rank)
- $ranks[] = $rank->label;
- }
- foreach ($ranks as $i=>$rank): ?>
- <span class="badge badge-<?php echo $i%2==0 ? 'dark':'secondary'; ?>"><?php echo $rank; ?></span>
- <?php endforeach; ?>
- </small>
- </div>
- </div>
- </div><br/>
- <div class="row">
- <div class="col-md-6">
- <label for="login">Identifiant :</label>
- <input required id="login" name="login" class="form-control" readonly="readonly" placeholder="Identifiant" value="<?php echo $myUser->login; ?>" type="text">
- </div>
- <div class="col-md-6">
- <label for="mail">Mail :</label>
- <input required id="mail" name="mail" class="form-control" placeholder="Mail" type="text" value="<?php echo $myUser->mail; ?>">
- </div>
- </div><br/>
- <div class="row">
- <div class="col-md-6">
- <label for="password">Mot de passe :</label>
- <input required id="password" data-show-strength data-generator data-type="password" name="password" class="form-control" placeholder="Mot de passe" type="password">
- </div>
- <div class="col-md-6">
- <label for="password2">Mot de passe (confirmation) :</label>
- <input required id="password2" data-type="password" name="password2" class="form-control" placeholder="Mot de passe (confirmation)" type="password">
- </div>
- </div><br>
- <div class="row">
- <div class="col-md-3">
- <label for="firstname">Prénom :</label>
- <input id="firstname" name="firstname" class="form-control" placeholder="Prénom" type="text" value="<?php echo $myUser->firstname; ?>">
- </div>
- <div class="col-md-3">
- <label for="name">Nom :</label>
- <input id="name" name="name" class="form-control" placeholder="Nom" type="text" value="<?php echo $myUser->name; ?>">
- </div>
- <div class="col-md-6">
- <label for="function">Fonction :</label>
- <input id="function" name="function" class="form-control" placeholder="ex: Responsable RH" type="text" value="<?php echo $myUser->function; ?>">
- </div>
- </div><br>
- <div class="row">
- <div class="col-md-6">
- <label for="phone">Téléphone fixe :</label>
- <input id="phone" name="phone" class="form-control" placeholder="N° Téléphone fixe" type="text" value="<?php echo $myUser->phone; ?>">
- </div><div class="col-md-6">
- <label for="mobile">Téléphone mobile :</label>
- <input id="mobile" name="mobile" class="form-control" placeholder="N° Téléphone mobile" type="text" value="<?php echo $myUser->mobile; ?>">
- </div>
-
- </div><br>
- <div class="row mb-2">
- <div class="col-md-6">
- <label for="">Compte créé le :</label>
- <input class="form-control-plaintext" readonly="readonly" type="text" value="<?php echo date('d/m/Y H:i', $myUser->created); ?>">
- </div>
- <div class="col-md-6">
- <label for="manager">Manager :</label>
- <input id="manager" name="manager" readonly="readonly" class="form-control-plaintext" placeholder="Nom de manager" type="text" value="<?php echo is_object($myUser->manager) ? $myUser->manager->fullName():' - '; ?>">
- </div>
- </div>
- <?php Plugin::callHook('account_global'); ?>
- <hr/>
- <div class="row mt-2 mb-2">
- <div class="col-md-12">
- <div onclick="account_save()" class="btn btn-success right"><i class="fas fa-check"></i> Enregistrer</div>
- </div>
- </div>
-
- </div>
|