newdesigngestionnaire/vues_newdesign/Ajaxtbajouterlocalite/index.php
2026-03-12 09:15:34 +00:00

57 lines
3.1 KiB
PHP
Executable File

<div class="card border-0 shadow-sm border-start border-success border-4 mb-4">
<div class="card-header bg-white py-3 border-0">
<h6 class="mb-0 fw-bold text-uppercase text-success small" id="titre_formData">
<i class="fas fa-plus-circle me-2"></i><?= _("Ajouter une Localité") ?>
</h6>
</div>
<div class="card-body">
<form id="formData">
<input type="hidden" id="id" name="id" value="<?= $localite['id'] ?? '' ?>">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label small fw-bold text-muted required"><?= _("Nom Localité") ?></label>
<div class="input-group">
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-map-marker-alt text-muted"></i></span>
<input class="form-control border-2 border-start-0 ps-0 majuscule"
type="text" id="libelle" name="libelle"
value="<?= $this->nettoyer($localite['libelle'] ?? '') ?>"
required autocomplete="off" autofocus>
</div>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted required"><?= _("Pays") ?></label>
<div class="input-group">
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-flag text-muted"></i></span>
<select name="codePays" id="codePays"
class="form-control border-2 border-start-0 ps-0 selectpicker"
data-live-search="true" required onchange="filtreVilleParPays();">
<?= liste_options($pays, $localite['codePays'] ?? '', false) ?>
</select>
</div>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted required"><?= _("District ou Région") ?></label>
<div class="input-group" id="div_ville">
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-city text-muted"></i></span>
<select name="codeVille" id="codeVille"
class="form-control border-2 border-start-0 ps-0 selectpicker"
data-live-search="true"
required onchange="JAVASCRIPT:filtreLocaliteParVille();">
<?= liste_options($ville, $localite['codeVille'] ?? '', false) ?>
</select>
</div>
</div>
</div>
</form>
</div>
</div>
<style>
/* Uniformisation des selects avec icônes */
.input-group > .bootstrap-select.form-control { flex: 1 1 auto; }
.bootstrap-select .btn { border-left: 0 !important; border-width: 2px !important; }
</style>