This commit is contained in:
KONE SOREL 2026-04-11 12:55:08 +00:00
parent eb85609142
commit 25ca470e70
2 changed files with 6 additions and 6 deletions

View File

@ -47857,15 +47857,15 @@ function formAjoutTableRef() {
// 4. Focus intelligent sur le PREMIER champ du formulaire
setTimeout(function() {
// On cherche le premier champ saisissable qui n'est pas caché
var $firstField = $('#div_maj_table').find('input:not([type="hidden"]):not([disabled]):visible, select:not([disabled]):visible').first();
// Sélecteur optimisé ESI : exclut hidden, disabled et readonly
var $firstField = $('#div_maj_table')
.find('input:not([type="hidden"]):not([disabled]):not([readonly]):visible, select:not([disabled]):not([readonly]):visible')
.first();
if ($firstField.length > 0) {
if ($firstField.hasClass('selectpicker')) {
// Focus spécifique pour le composant Bootstrap-Select
$firstField.selectpicker('focus');
} else {
// Focus standard
$firstField.focus();
}
}

View File

@ -11,7 +11,7 @@
<div class="row g-3">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted required">Code</label>
<label class="form-label small fw-bold text-muted">Code</label>
<div class="input-group">
<span class="input-group-text bg-light border-2 border-end-0"><i class="fas fa-lock text-muted"></i></span>
<input class="form-control border-2 border-start-0 ps-0 majuscule fw-bold bg-white"
@ -19,7 +19,7 @@
id="codePays"
name="codePays"
value="<?= $this->nettoyer($pays['codePays']); ?>"
required>
readonly>
</div>
</div>