This commit is contained in:
KONE SOREL 2026-01-14 10:38:03 +00:00
parent 3bad926d06
commit 193d05b62a

View File

@ -1,73 +1,111 @@
<?php
$this->titre = "ISA WEB - Modifier Utilisteur Portail RH";
$this->titre = "ISA WEB - Modifier Utilisateur";
$idClient = $this->nettoyer($user_rh['idClient']);
$idUtilisateur = $user_rh['id'];
$codeUtilisateur = $user_rh['codeUtilisateur'];
$actif = $user_rh['actif'];
$actVisible = $user_rh['actVisible'];
$reInit = $user_rh['reInit'];
$codeLangue = $user_rh['codeLangue'];
$AffectionVisible = $user_rh['AffectionVisible'];
$codeProfil = $user_rh['codeProfil'];
$idClient = $this->nettoyer($user_rh['idClient']);
$idUtilisateur = $user_rh['id'];
$codeUtilisateur = $user_rh['codeUtilisateur'];
$actif = $user_rh['actif'];
$codeProfil = $user_rh['codeProfil'];
$codeLangue = $user_rh['codeLangue'];
?>
<script type="text/javascript">
<div id="div_liste" class="container-fluid py-4 animate__animated animate__fadeIn">
<input class="visually-hidden" type="text" id="idUtilisateur" value="<?= $idUtilisateur ?>">
<input class="visually-hidden" type="text" id="idClient" value="<?= $idClient ?>">
</script>
<h1 class="text-primary"><i class="fas fa-user-edit me-2"></i> <?= _("Modifier l'utilisateur") ?></h1>
<input class="sr-only" type="text" id="idUtilisateur" name="idUtilisateur" value="<?= $idUtilisateur ?>" >
<input class="sr-only" type="text" id="idClient" name="idClient" value="<?= $idClient ?>" >
<div class="card shadow border-0">
<div class="card-header bg-primary text-white py-3">
<div class="d-flex justify-content-between align-items-center">
<h5 class="mb-0 fw-bold">
<span class="text-white-50"><?= $codeUtilisateur ?></span>
</h5>
<button type="button" class="btn-close btn-close-white" onClick="retour_a_users_rh_client();"></button>
</div>
</div>
<legend> <?= _("Modifier Utilisateur") . ": " . $codeUtilisateur ?> </legend>
<div class="card-body p-4">
<form id="form_modif_user">
<div class="row mb-4">
<div class="col-12 mb-3">
<h6 class="text-primary text-uppercase small fw-bold border-bottom pb-2">
<i class="fas fa-id-card me-2"></i><?= _("Informations Personnelles") ?>
</h6>
</div>
<div class="col-md-6 mb-3">
<label class="form-label small fw-bold required"><?= _("Nom") ?></label>
<input type="text" id="nom" name="nom" class="form-control shadow-sm"
value="<?= $this->nettoyer($user_rh['nom']) ?>" required autocomplete="off" autofocus>
</div>
<div class="col-md-6 mb-3">
<label class="form-label small fw-bold"><?= _("Prénoms") ?></label>
<input type="text" id="prenoms" name="prenoms" class="form-control shadow-sm"
value="<?= $this->nettoyer($user_rh['prenoms']) ?>">
</div>
<div class="col-md-6 mb-3">
<label class="form-label small fw-bold required"><?= _("Téléphone") ?></label>
<div class="input-group shadow-sm">
<span class="input-group-text"><i class="fas fa-phone"></i></span>
<input type="tel" id="telephone" name="telephone" class="form-control"
value="<?= $this->nettoyer($user_rh['telephone']) ?>" required>
</div>
</div>
<div class="col-md-6 mb-3">
<label class="form-label small fw-bold required"><?= _("E-mail") ?></label>
<div class="input-group shadow-sm">
<span class="input-group-text"><i class="fas fa-envelope"></i></span>
<input type="email" id="email" name="email" class="form-control"
value="<?= $this->nettoyer($user_rh['email']) ?>" required>
</div>
</div>
</div>
<table class="table table-responsive table-condensed" style="font-size:10pt;">
<tbody>
<tr>
<td width="10%" class="required"> <?= _("Nom") ?> </td>
<td width="40%" ><INPUT style="font-size:10pt;" class="form-control" TYPE="text" id="nom" NAME="nom" value="<?=$this->nettoyer( $user_rh['nom'])?>" required AUTOCOMPLETE="OFF" autofocus ></td>
<div class="row mb-4">
<div class="col-12 mb-3">
<h6 class="text-primary text-uppercase small fw-bold border-bottom pb-2">
<i class="fas fa-cog me-2"></i><?= _("Paramètres du Compte") ?>
</h6>
</div>
<div class="col-md-4 mb-3">
<label class="form-label small fw-bold"><?= _("Profil / Rôle") ?></label>
<select class="form-select shadow-sm fw-bold border-info-subtle" id="codeProfil" name="codeProfil">
<?php liste_options($user_profil, $codeProfil, true); ?>
</select>
</div>
<div class="col-md-4 mb-3">
<label class="form-label small fw-bold"><?= _("Statut d'activité") ?></label>
<select class="form-select shadow-sm" id="actif" name="actif">
<?php liste_options($user_actif, $actif, true); ?>
</select>
</div>
<div class="col-md-4 mb-3">
<label class="form-label small fw-bold"><?= _("Langue préférée") ?></label>
<select class="form-select shadow-sm" id="codeLangueUser" name="codeLangueUser">
<?php liste_options($langue, $codeLangue, true); ?>
</select>
</div>
</div>
<td width="12%" align="center" > <?= _("Prénoms") ?> </td>
<td colspan="3" ><INPUT style="font-size:10pt;" class="form-control" TYPE="text" id="prenoms" NAME="prenoms" value="<?=$this->nettoyer( $user_rh['prenoms'])?>" ></td>
</tr>
<tr>
<td class="required"> <?= _("Téléphone") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="tel" id="telephone" NAME="telephone" value="<?=$this->nettoyer( $user_rh['telephone'])?>" required></td>
<div class="row mt-4">
<div class="col-12 d-flex justify-content-end gap-2">
<button type="button" class="btn btn-light border px-4 shadow-sm fw-bold" onClick="retour_a_users_rh_client();">
<i class="fas fa-arrow-left me-2"></i><?= _("Annuler") ?>
</button>
<button type="button" id="btn_enreg" class="btn btn-primary px-5 shadow-sm fw-bold" onClick="enregistrer_modif_user_rh();">
<i class="fas fa-save me-2"></i><?= _("Enregistrer les modifications") ?>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<td align="center" class="required"> E-mail </td>
<td colspan="3" > <INPUT style='font-size:10pt;' class="form-control" TYPE="email" id="email" NAME="email" value="<?=$this->nettoyer( $user_rh['email'])?>" required> </td>
</tr>
<tr>
<td> <?= _("Profil/Rôle") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-select" id="codeProfil" NAME="codeProfil" >
<?php liste_options($user_profil, $codeProfil, true); ?>
</SELECT>
</td>
<td align="center"> <?= _("Actif?") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-select" id="actif" NAME="actif" >
<?php liste_options($user_actif, $actif, true); ?>
</SELECT>
</td>
<td align="center"> <?= _("Langue") ?> </td>
<td>
<SELECT style="font-size:10pt;" class="form-select" id="codeLangueUser" NAME="codeLangueUser" >
<?php liste_options($langue, $codeLangue, true); ?>
</SELECT>
</td>
</tr>
<tr>
<td> </td>
<td> <input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrer_modif_user_rh();" style='font-size:10pt;' > </td>
<td> </td>
<td colspan="3" > <input class = "form-control btn btn-warning" type="button" value="<?= _("Annuler") ?>" onClick="javascript:retour_a_users_rh_client();" style='font-size:9pt;' > </td>
</tr>
</tbody>
</table>
<style>
.required:after { content: " *"; color: red; }
.card { border-radius: 12px; }
.form-control, .form-select, .input-group-text { border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: #0d6efd; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15); }
.input-group-text { background-color: #f8f9fa; color: #6c757d; }
</style>