This commit is contained in:
KONE SOREL 2026-03-11 14:44:57 +00:00
parent 5782c428c3
commit 036855367d
3 changed files with 249 additions and 122 deletions

View File

@ -1,16 +1,77 @@
<form id="formData"> <div class="card border-0 shadow-sm border-start border-4 border-primary">
<legend id="titre_formData"><?= _("Ajouter des données") ?></legend> <div class="card-header bg-white py-3 border-bottom">
<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 type de paiement") ?>
<tr> </h6>
</div>
<td width="5%" align="center" class="required"><?= _("Libellé Fr") ?></td> <div class="card-body p-4">
<td width="28%" ><INPUT class="form-control majuscule" TYPE="text" id="libelle" NAME="libelle" required AUTOCOMPLETE="OFF" ></td> <form id="formData" class="container-fluid p-0">
<div class="row g-4">
<td width="5%" align="center"><?= _("Libellé Eng") ?></td>
<td width="27%"><INPUT class="form-control majuscule" TYPE="text" id="libelleEng" NAME="libelleEng"></td> <div class="col-md-6">
</tr> <label class="form-label fw-bold text-muted small required"><?= _("Libellé (Fr)") ?></label>
</tbody> <div class="input-group shadow-xs">
</table> <span class="input-group-text bg-white border-2 border-end-0">
</form> <img src="../Bootstrap_new/images/france.png" width="16" alt="FR">
</span>
<input type="text"
class="form-control border-2 border-start-0 majuscule fw-bold"
id="libelle"
name="libelle"
required
autocomplete="OFF">
</div>
</div>
<div class="col-md-6">
<label class="form-label fw-bold text-muted small"><?= _("Libellé (Eng)") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0">
<img src="../Bootstrap_new/images/england.png" width="16" alt="EN">
</span>
<input type="text"
class="form-control border-2 border-start-0 majuscule"
id="libelleEng"
name="libelleEng"
autocomplete="OFF">
</div>
</div>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function() {
// Règle d'Or Neutral Pro : Focus différé de 200ms
setTimeout(function() {
$('#libelle').focus();
}, 200);
});
</script>
<style>
/* Identité Visuelle 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;
border-color: #dee2e6;
}
.form-control:focus {
border-color: #212e53;
box-shadow: 0 0 0 0.25rem rgba(33, 46, 83, 0.1);
}
.majuscule { text-transform: uppercase; }
.required:after {
content: " *";
color: #dc3545;
font-weight: bold;
}
</style>

View File

@ -1,91 +1,78 @@
<?php <?php
$nbreTotal = count($typepaiement); // Préparation simplifiée du compteur Standard Neutral Pro
$nbreTotal = count($typepaiement);
if($nbreTotal < 10){
$nbreTotal = '0'.$nbreTotal;
}else{
$nbreTotal = format_N($nbreTotal);
}
if (est_anglophone()){
if($existeselection){
$libbouton = "Uncheck all";
}else{
$libbouton = "Check all";
}
}else{
if($existeselection){
$libbouton = "Décocher tous";
}else{
$libbouton = "Cocher tous";
}
}
?> ?>
<?php $superUser = $_SESSION['superUser']; ?> <div class="card border-0 shadow-sm overflow-hidden">
<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">
<h6 class="mb-0 fw-bold text-uppercase text-primary small">
<i class="fas fa-list-alt me-2"></i><?= _("Référentiel des Types de Paiement") ?>
</h6>
<span class="badge bg-primary-ghost text-primary ms-3 px-3 py-2 rounded-pill fw-bold" id="badge-total">
<?= $nbreTotal ?> <?= _("Lignes") ?>
</span>
</div>
<div id="table-buttons" class="d-flex gap-2"></div>
</div>
<table style="margin: auto" class="table-responsive"> <div class="card-body p-0">
<tbody> <div class="table-responsive">
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="<?= _("Lignes Total").": ". $nbreTotal; ?>" readonly> </td> <table id="tableLister" class="table table-hover align-middle mb-0" style="width:100%">
</tbody> <thead class="bg-light text-muted small text-uppercase">
</table> <tr>
<input type="hidden" id="total" value="<?= $nbreTotal; ?>"> <th class="ps-4 border-0" width="15%"><?= _("Centre gestion") ?></th>
<input type="hidden" id="selectionne" value="<?= $existeselection ? 'true' : 'false'; ?>"> <th class="border-0" width="15%">Code</th>
<table id="tableLister" class="table table-striped table-bordered table-hover table-condensed table-responsive"> <th class="border-0"><?= _("Libellé") ?></th>
<thead> <th class="border-0 text-center pe-4" width="15%"><?= _("Actions") ?></th>
<tr> </tr>
<th class="text-center"><?= _("Centre gestion") ?></th> </thead>
<th class="text-center">Code</th> <tbody>
<th class="text-center"><?= _("Libellé") ?></th> <?php foreach ($typepaiement as $v):
<!-- $idData = $this->nettoyer($v['id']);
<th class="text-center"> $libelle = est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']);
<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> <tr>
--> <td class="ps-4 fw-medium text-muted small">
<th class="text-center"><?= _("Modifier") ?></th> <?= $this->nettoyer($v['codeSociete']) ?>
<!-- </td>
<th class="text-center">Supprimer</th> <td>
--> <span class="badge bg-light text-dark border fw-bold px-2 py-1">
</tr> <?= $this->nettoyer($v['codeTypePaiement']) ?>
</thead> </span>
<tbody> </td>
<?php foreach ($typepaiement as $v): <td class="fw-bold text-dark text-uppercase">
$idData = $this->nettoyer($v['id']); <?= $libelle ?>
if (est_anglophone()){ </td>
$libelle = $this->nettoyer($v['libelleEng']); <td class="text-center pe-4">
}else{ <button type="button"
$libelle = $this->nettoyer($v['libelle']); 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") ?>
<tr valign="top"> </button>
<td class="text-center" width="15%"><?= $this->nettoyer($v['codeSociete']);; ?> </td>
<td class="text-center" width="10%"><?= $this->nettoyer($v['codeTypePaiement']) ?></td> </tr>
<td class="text-left" width="55%"><?= $libelle; ?></td> <?php endforeach; ?>
<!-- </tbody>
<td class="text-center" width="10%"> </table>
<?php </div>
if($this->nettoyer($v['choix'] == '0')){ </div>
$check =''; </div>
}
else{ <script>
$check = 'checked'; $(document).ready(function() {
} // Initialisation standard avec exports et recherche intelligente
?> initDataTableReference('#tableLister', 'Types_Paiement');
<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> </script>
-->
<td class="text-center" width="10%"> <style>
<button style="width:100%" class ="form-control btn btn-primary" type="button" id="btn-editer" name="Modifier" /* Rappel des constantes visuelles Neutral Pro */
onclick="JAVASCRIPT:formModifTableRef(<?= $idData; ?>);" ><?= _("Modifier") ?></button> #tableLister tbody td {
</td> height: 60px;
<!-- border-bottom: 1px solid #f1f4f6;
<td class="text-center" width="10%"> }
<button style="width:100%" class = "form-control btn btn-danger" type="button" id="btn-supprimer" name="Supprimer" .bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08) !important; }
onclick="JAVASCRIPT:supprimeLigneListe(<?= $idData; ?>,'<?= $superUser; ?>')">Supprimer</button> .shadow-xs { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
</td> .text-primary { color: #212e53 !important; }
--> </style>
</tr>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -1,18 +1,97 @@
<form id="formData"> <div class="card border-0 shadow-sm border-start border-4 border-primary">
<legend id="titre_formData"><?= _("Modification des données") ?></legend> <div class="card-header bg-white py-3 border-bottom">
<INPUT class="sr-only" TYPE="text" id = "id" name = "id" value="<?=$typepaiement['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 type de paiement") ?>
<tbody> </h6>
<tr> </div>
<td width="5%" align="center">Code</td>
<td width="5%" ><INPUT class="form-control majuscule" TYPE="text" id="codeTypePaiement" NAME="codeTypePaiement" value="<?= $this->nettoyer($typepaiement['codeTypePaiement']); ?>" disabled></td> <div class="card-body p-4">
<form id="formData" class="container-fluid p-0">
<td width="5%" align="center" class="required"><?= _("Libellé") ?></td> <input type="hidden" id="id" name="id" value="<?= $this->nettoyer($typepaiement['id']) ?>">
<td width="28%" ><INPUT class="form-control majuscule" TYPE="text" id="libelle" NAME="libelle" required AUTOCOMPLETE="OFF" value="<?= $this->nettoyer($typepaiement['libelle']); ?>"></td>
<div class="row g-4 align-items-end">
<td width="5%" align="center" class="required"><?= _("Libellé Eng") ?></td>
<td width="27%" ><INPUT class="form-control majuscule" TYPE="text" id="libelleEng" NAME="libelleEng" value="<?= $this->nettoyer($typepaiement['libelleEng']); ?>" required AUTOCOMPLETE="OFF"></td> <div class="col-md-2">
</tr> <label class="form-label fw-bold text-muted small">Code</label>
</tbody> <div class="input-group shadow-xs">
</table> <span class="input-group-text bg-light border-2 border-end-0">
</form> <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 text-center"
id="codeTypePaiement"
name="codeTypePaiement"
value="<?= $this->nettoyer($typepaiement['codeTypePaiement']); ?>"
disabled>
</div>
</div>
<div class="col-md-5">
<label class="form-label fw-bold text-muted small required"><?= _("Libellé (Fr)") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0">
<img src="../Bootstrap_new/images/france.png" width="16" alt="FR">
</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($typepaiement['libelle']); ?>">
</div>
</div>
<div class="col-md-5">
<label class="form-label fw-bold text-muted small required"><?= _("Libellé (Eng)") ?></label>
<div class="input-group shadow-xs">
<span class="input-group-text bg-white border-2 border-end-0">
<img src="../Bootstrap_new/images/england.png" width="16" alt="EN">
</span>
<input type="text"
class="form-control border-2 border-start-0 majuscule fw-bold"
id="libelleEng"
name="libelleEng"
required
autocomplete="OFF"
value="<?= $this->nettoyer($typepaiement['libelleEng']); ?>">
</div>
</div>
</div>
</form>
</div>
</div>
<script>
$(document).ready(function() {
// Règle d'Or Neutral Pro : Focus différé de 200ms
setTimeout(function() {
$('#libelle').focus();
}, 200);
});
</script>
<style>
/* Identité Visuelle 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;
border-color: #dee2e6;
}
.form-control:focus {
border-color: #212e53;
box-shadow: 0 0 0 0.25rem rgba(33, 46, 83, 0.1);
}
.majuscule { text-transform: uppercase; }
.required:after {
content: " *";
color: #dc3545;
font-weight: bold;
}
</style>