newdesigngestionnaire/Vue/Ajaxtbmodifierpointvente/index.php
2026-03-14 10:50:20 +00:00

134 lines
7.4 KiB
PHP
Executable File

<div class="card border-0 shadow-sm border-start border-4 border-primary">
<div class="card-header bg-white py-3 border-bottom">
<h6 class="mb-0 fw-bold text-uppercase text-warning small" id="titre_formData">
<i class="fas fa-edit me-2"></i><?= _("Modification des données du point de vente") ?>
</h6>
</div>
<div class="card-body p-4">
<form id="formData" class="container-fluid p-0">
<input type="hidden" id="id" name="id" value="<?= $this->nettoyer($pointvente['id']) ?>">
<div class="row g-3">
<div class="col-md-2">
<label class="form-label fw-bold text-muted small">Code</label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-lock text-muted"></i></span>
<input type="text" class="form-control border-2 border-start-0 majuscule fw-bold bg-light"
id="codePointVente" name="codePointVente" value="<?= $this->nettoyer($pointvente['codePointVente']); ?>" disabled>
</div>
</div>
<div class="col-md-7">
<label class="form-label fw-bold text-muted small required"><?= _("Libellé") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-store text-primary"></i></span>
<input type="text" class="form-control border-2 border-start-0 majuscule fw-bold"
id="libelle" name="libelle" required autocomplete="OFF"
value="<?= $this->nettoyer($pointvente['libelle']); ?>">
</div>
</div>
<div class="col-md-3">
<label class="form-label fw-bold text-muted small">Type</label>
<select name="codeTypePointVente" id="codeTypePointVente" class="selectpicker form-control border-2 shadow-xs" data-container="body">
<?= liste_options($typepointvente, $this->nettoyer($pointvente['codeTypePointVente']), true) ?>
</select>
</div>
<div class="col-md-6">
<label class="form-label fw-bold text-muted small">E-mail</label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-envelope text-muted"></i></span>
<input type="email" class="form-control border-2 border-start-0" id="email" name="email"
value="<?= $this->nettoyer($pointvente['email']); ?>">
</div>
</div>
<div class="col-md-6">
<label class="form-label fw-bold text-muted small"><?= _("Téléphone") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-phone text-muted"></i></span>
<input type="tel" class="form-control border-2 border-start-0" id="telephone" name="telephone"
value="<?= $this->nettoyer($pointvente['telephone']); ?>">
</div>
</div>
<div class="col-md-4">
<label class="form-label fw-bold text-muted small"><?= _("Adresse Postale") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-map-signs text-muted"></i></span>
<input type="text" class="form-control border-2 border-start-0 majuscule" id="adressePost" name="adressePost"
value="<?= $this->nettoyer($pointvente['adressePost']); ?>">
</div>
</div>
<div class="col-md-8">
<label class="form-label fw-bold text-muted small"><?= _("Adresse Géographique") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0"><i class="fas fa-map-marker-alt text-muted"></i></span>
<input type="text" class="form-control border-2 border-start-0 majuscule" id="adresseGeo" name="adresseGeo"
value="<?= $this->nettoyer($pointvente['adresseGeo']); ?>">
</div>
</div>
<div class="col-md-4">
<label class="form-label fw-bold text-muted small"><?= _("Pays") ?></label>
<select name="codePays" id="codePays" class="selectpicker form-control border-2 shadow-xs"
data-live-search="true" data-container="body" onchange="filtreVilleParPays();">
<?= liste_options($pays, $this->nettoyer($pointvente['codePays']), true) ?>
</select>
</div>
<div class="col-md-4">
<label class="form-label fw-bold text-muted small"><?= _("Région") ?></label>
<div id="div_ville">
<select name="codeVille" id="codeVille" class="selectpicker form-control border-2 shadow-xs"
data-live-search="true" data-container="body" onchange="JAVASCRIPT:filtreLocaliteParVille();">
<?= liste_options($ville, $this->nettoyer($pointvente['codeVille']), true) ?>
</select>
</div>
</div>
<div class="col-md-4">
<label class="form-label fw-bold text-muted small"><?= _("Ville") ?></label>
<div id="div_localite">
<select name="codeLocalite" id="codeLocalite" class="selectpicker form-control border-2 shadow-xs"
data-live-search="true" data-container="body">
<?= liste_options($localite, $this->nettoyer($pointvente['codeLocalite']), true) ?>
</select>
</div>
</div>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function() {
// Initialisation SelectPicker
$('.selectpicker').selectpicker();
// Règle d'Or Neutral Pro : Focus différé de 200ms
setTimeout(function() {
$('#libelle').focus();
}, 200);
});
</script>
<style>
/* Intégration identité Neutral Pro */
.border-primary { border-color: #212e53 !important; }
.shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.form-control.border-2, .input-group-text.border-2 { border-width: 2px !important; }
.majuscule { text-transform: uppercase; }
.required:after { content: " *"; color: #dc3545; font-weight: bold; }
/* Style spécifique SelectPicker pour cohérence 2px */
.bootstrap-select > .dropdown-toggle {
border-width: 2px !important;
height: 38px !important;
background-color: #fff !important;
}
</style>