sd
This commit is contained in:
parent
3bb38d983e
commit
2cfe57d561
|
|
@ -1,14 +1,61 @@
|
||||||
<form id="formData">
|
<div class="card border-0 shadow-sm border-start border-success border-4 mb-4">
|
||||||
<legend id="titre_formData"><?= _("Ajouter des données") ?></legend>
|
<div class="card-header bg-white py-3 border-0">
|
||||||
<table class="table table-responsive table-condensed">
|
<h6 class="mb-0 fw-bold text-uppercase text-success small" id="titre_formData">
|
||||||
<tbody>
|
<i class="fas fa-plus-circle me-2"></i><?= _("Ajouter un Pays") ?>
|
||||||
<tr>
|
</h6>
|
||||||
<td width="5%" align="center" class="required">Code</td>
|
</div>
|
||||||
<td width="10%" ><INPUT class="form-control majuscule" TYPE="text" id="codePays" NAME="codePays" required AUTOCOMPLETE="OFF" autofocus ></td>
|
|
||||||
|
<div class="card-body">
|
||||||
|
<form id="formData">
|
||||||
|
<div class="row g-3">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<label class="form-label small fw-bold text-muted required">Code</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-barcode text-muted"></i></span>
|
||||||
|
<input class="form-control border-2 border-start-0 ps-0 majuscule fw-bold"
|
||||||
|
type="text"
|
||||||
|
id="codePays"
|
||||||
|
name="codePays"
|
||||||
|
maxlength="3"
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
autofocus>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-9">
|
||||||
|
<label class="form-label small fw-bold text-muted required"><?= _("Libellé du Pays") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-globe-africa text-muted"></i></span>
|
||||||
|
<input class="form-control border-2 border-start-0 ps-0 majuscule"
|
||||||
|
type="text"
|
||||||
|
id="libelle"
|
||||||
|
name="libelle"
|
||||||
|
required
|
||||||
|
autocomplete="off">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<td width="5%" align="center" class="required"><?= _("Libellé") ?></td>
|
<div id="form-errors" class="alert alert-danger mt-3 d-none small py-2"></div>
|
||||||
<td width="70%" ><INPUT class="form-control majuscule" TYPE="text" id="libelle" NAME="libelle" required AUTOCOMPLETE="OFF" ></td>
|
</form>
|
||||||
</tr>
|
</div>
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
|
||||||
</form>
|
<style>
|
||||||
|
/* Force la majuscule pendant la saisie */
|
||||||
|
.majuscule { text-transform: uppercase; }
|
||||||
|
|
||||||
|
/* Style spécifique pour les champs requis */
|
||||||
|
.required:after {
|
||||||
|
content: " *";
|
||||||
|
color: #dc3545;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Animation au focus */
|
||||||
|
.form-control:focus {
|
||||||
|
border-color: #28a745 !important;
|
||||||
|
box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.15) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,84 +1,62 @@
|
||||||
<?php
|
<div class="card border-0 shadow-sm overflow-hidden" style="border-radius: var(--radius-md);">
|
||||||
$nbreTotal = count($pays);
|
<div class="card-header bg-white py-3 border-bottom d-flex justify-content-between align-items-center">
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
if($nbreTotal < 10){
|
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
|
||||||
$nbreTotal = '0'.$nbreTotal;
|
<i class="fas fa-table me-2"></i><?= _("Référentiel des Pays") ?>
|
||||||
}else{
|
</h6>
|
||||||
$nbreTotal = format_N($nbreTotal);
|
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
|
||||||
}
|
0 <?= _("Lignes") ?>
|
||||||
|
</span>
|
||||||
if (est_anglophone()){
|
</div>
|
||||||
if($existeselection){
|
<div id="table-buttons" class="d-flex gap-2"></div>
|
||||||
$libbouton = "Uncheck all";
|
</div>
|
||||||
}else{
|
|
||||||
$libbouton = "Check all";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if($existeselection){
|
|
||||||
$libbouton = "Décocher tous";
|
|
||||||
}else{
|
|
||||||
$libbouton = "Cocher tous";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php $superUser = $_SESSION['superUser']; ?>
|
<div class="card-body p-0">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="tableLister" class="table table-hover align-middle mb-0" style="width:100%">
|
||||||
|
<thead class="bg-light text-muted small text-uppercase">
|
||||||
|
<tr>
|
||||||
|
<th class="ps-4 border-0"><?= _("Centre") ?></th>
|
||||||
|
<th class="border-0 text-center"><?= _("Code") ?></th>
|
||||||
|
<th class="border-0"><?= _("Libellé") ?></th>
|
||||||
|
<th class="border-0 text-center pe-4"><?= _("Actions") ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($pays as $v):
|
||||||
|
$idData = $this->nettoyer($v['id']);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="ps-4 fw-medium text-dark"><?= $this->nettoyer($v['codeSociete']) ?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<span class="badge bg-light text-dark fw-bold border"><?= $this->nettoyer($v['codePays']) ?></span>
|
||||||
|
</td>
|
||||||
|
<td class="text-dark fw-bold"><?= $this->nettoyer($v['libelle']) ?></td>
|
||||||
|
<td class="text-center pe-4">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-outline-primary btn-sm px-3 rounded-pill fw-bold shadow-xs"
|
||||||
|
onclick="formModifTableRef(<?= $idData ?>);">
|
||||||
|
<i class="fas fa-edit me-1"></i> <?= _("Modifier") ?>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table style="margin: auto" class="table-responsive">
|
<style>
|
||||||
<tbody>
|
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
|
||||||
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="<?= _("Lignes Total").": ". $nbreTotal; ?>" readonly> </td>
|
#tableLister thead th { padding-top: 15px; padding-bottom: 15px; font-weight: 700; }
|
||||||
</tbody>
|
#tableLister tbody td { border-color: #f1f4f6; }
|
||||||
</table>
|
.shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
|
||||||
<input type="hidden" id="total" value="<?= $nbreTotal; ?>">
|
|
||||||
<table id="tableLister" class="table table-striped table-bordered table-hover table-condensed table-responsive compact">
|
/* Style pour les boutons d'export injectés */
|
||||||
<thead>
|
.dt-buttons .btn {
|
||||||
<tr>
|
font-size: 0.75rem !important;
|
||||||
<th class="text-center"><?= _("Centre gestion") ?></th>
|
padding: 0.4rem 0.8rem !important;
|
||||||
<th class="text-center">Code</th>
|
}
|
||||||
<th class="text-center"><?= _("Libellé") ?></th>
|
.text-primary { color: #212e53 !important; }
|
||||||
<!--
|
</style>
|
||||||
<th class="text-center">
|
|
||||||
<button type="button" style="font-size:10pt; font-weight: bold; width:100%; background-color:#4caf50; color: white;" class="form-control btn" onclick="javascript:cocherDecocherTout($('#fichier_lister').val());" > <?= $libbouton; ?> </button>
|
|
||||||
</th>
|
|
||||||
-->
|
|
||||||
<th class="text-center"><?= _("Modifier") ?></th>
|
|
||||||
<!--
|
|
||||||
<th class="text-center">Supprimer</th>
|
|
||||||
-->
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($pays as $v):
|
|
||||||
$idData = $this->nettoyer($v['id']);
|
|
||||||
?>
|
|
||||||
<tr valign="top">
|
|
||||||
<td class="text-center" width="15%"><?= $this->nettoyer($v['codeSociete']) ?></td>
|
|
||||||
<td class="text-center" width="10%"><?= $this->nettoyer($v['codePays']) ?></td>
|
|
||||||
<td class="text-left" width="70%"><?= $this->nettoyer($v['libelle']) ?></td>
|
|
||||||
<!--
|
|
||||||
<td class="text-center" width="10%">
|
|
||||||
<?php
|
|
||||||
if($this->nettoyer($v['choix'] == '0')){
|
|
||||||
$check ='';
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$check = 'checked';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<INPUT TYPE="checkbox" class="custom-control-input" style="width: 2rem;height: 2rem;" id="choix" NAME="choix" value="<?=(($this->nettoyer($v['choix'])==0)? 0 : 1);?>" onclick="if (this.checked) this.value=1; else this.value=0;cocherDecocherUn($('#fichier_lister').val(),<?= $idData; ?>);" <?= $check;?>>
|
|
||||||
</td>
|
|
||||||
-->
|
|
||||||
<td class="text-center" width="10%">
|
|
||||||
<button style="width:100%" class ="form-control btn btn-primary" type="button" id="btn-editer" name="Modifier"
|
|
||||||
onclick="JAVASCRIPT:formModifTableRef(<?= $idData; ?>);" ><?= _("Modifier") ?></button>
|
|
||||||
</td>
|
|
||||||
<!--
|
|
||||||
<td class="text-center" width="10%">
|
|
||||||
<button style="width:100%" class = "form-control btn btn-danger" type="button" id="btn-supprimer" name="Supprimer"
|
|
||||||
onclick="JAVASCRIPT:supprimeLigneListe(<?= $idData; ?>,'<?= $superUser; ?>')">Supprimer</button>
|
|
||||||
</td>
|
|
||||||
-->
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
@ -1,15 +1,57 @@
|
||||||
<form id="formData">
|
<div class="card border-0 shadow-sm border-start border-primary border-4 mb-4">
|
||||||
<legend id="titre_formData"><?= _("Modification des données") ?></legend>
|
<div class="card-header bg-white py-3 border-0">
|
||||||
<INPUT class="sr-only" TYPE="text" id = "id" name = "id" value="<?=$pays['id']?>">
|
<h6 class="mb-0 fw-bold text-uppercase text-warning small" id="titre_formData">
|
||||||
<table class="table table-responsive table-condensed">
|
<i class="fas fa-edit me-2"></i><?= _("Modification des données du Pays") ?>
|
||||||
<tbody>
|
</h6>
|
||||||
<tr>
|
</div>
|
||||||
<td width="5%" align="center">Code</td>
|
|
||||||
<td width="10%" ><INPUT class="form-control majuscule" TYPE="text" id="codePays" NAME="codePays" required AUTOCOMPLETE="OFF" autofocus value="<?= $this->nettoyer($pays['codePays']); ?>" readonly></td>
|
<div class="card-body">
|
||||||
|
<form id="formData">
|
||||||
|
<input type="hidden" id="id" name="id" value="<?= $pays['id'] ?>">
|
||||||
|
|
||||||
<td width="5%" align="center" class="required"><?= _("Libellé") ?></td>
|
<div class="row g-3">
|
||||||
<td width="70%" ><INPUT class="form-control majuscule" TYPE="text" id="libelle" NAME="libelle" required AUTOCOMPLETE="OFF" value="<?= $this->nettoyer($pays['libelle']); ?>"></td>
|
<div class="col-md-3">
|
||||||
</tr>
|
<label class="form-label small fw-bold text-muted">Code</label>
|
||||||
</tbody>
|
<div class="input-group">
|
||||||
</table>
|
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-lock text-muted"></i></span>
|
||||||
</form>
|
<input class="form-control border-2 border-start-0 ps-0 majuscule fw-bold bg-white"
|
||||||
|
type="text"
|
||||||
|
id="codePays"
|
||||||
|
name="codePays"
|
||||||
|
value="<?= $this->nettoyer($pays['codePays']); ?>"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-9">
|
||||||
|
<label class="form-label small fw-bold text-muted required"><?= _("Libellé du Pays") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-globe-africa 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($pays['libelle']); ?>"
|
||||||
|
required
|
||||||
|
autocomplete="off"
|
||||||
|
autofocus>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Focus Ring spécifique au mode édition */
|
||||||
|
.form-control:focus {
|
||||||
|
border-color: #212e53 !important;
|
||||||
|
box-shadow: 0 0 0 0.25rem rgba(33, 46, 83, 0.15) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style champ readonly pour qu'il ne paraisse pas désactivé mais protégé */
|
||||||
|
input[readonly] {
|
||||||
|
cursor: not-allowed;
|
||||||
|
color: #6c757d !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user