rhsaas/Vue/Ficheuserrhclient/index.php
2026-01-16 07:11:49 +00:00

111 lines
6.2 KiB
PHP
Executable File

<?php
$this->titre = "ISA WEB - Modifier Utilisateur";
$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'];
?>
<div id="div_liste" class="container-fluid py-2 animate__animated animate__fadeIn">
<input class="visually-hidden" type="text" id="idUtilisateur" value="<?= $idUtilisateur ?>">
<input class="visually-hidden" type="text" id="idClient" value="<?= $idClient ?>">
<h1 class="text-primary"><i class="fas fa-user-edit me-2"></i> <?= _("Modifier l'utilisateur") ?></h1>
<div class="card-header d-flex justify-content-between align-items-center py-1">
<h5 class="badge bg-secondary mb-0 fw-bold">
<span class="fw-normal text-dark-50"><?= $codeUtilisateur ?></span>
</h5>
<div class="d-flex align-items-center gap-3">
<button type="button" class="btn-close btn-close-dark" onClick="retour_a_users_rh_client();"></button>
</div>
</div>
<div class="card shadow border-0">
<div class="card-body p-2">
<form id="form_modif_user">
<div class="row mb-2">
<div class="col-12 mb-2">
<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-2">
<label class="form-label small fw-bold required text-uppercase"><?= _("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-2">
<label class="form-label small fw-bold text-uppercase"><?= _("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-2">
<label class="form-label small fw-bold required text-uppercase"><?= _("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-2">
<label class="form-label small fw-bold required text-uppercase"><?= _("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>
<div class="row mb-2">
<div class="col-12 mb-2">
<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-2">
<label class="form-label small fw-bold text-uppercase"><?= _("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-2">
<label class="form-label small fw-bold text-uppercase"><?= _("En 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-2">
<label class="form-label small fw-bold text-uppercase"><?= _("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>
<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>
<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>