Update bib management for MSIN-4429: Refine quantity and end input handling
This commit enhances the bib management system by updating the CSS layout for quantity and end inputs, ensuring proper alignment and display. It also modifies PHP functions to introduce a new column for the "or" separator between quantity and end values, improving the user interface. Additionally, new SQL entries are added to support the updated functionality, including localized labels and hints for user guidance. These changes aim to improve usability and clarity in the bib input process.
This commit is contained in:
@ -1961,14 +1961,16 @@ a.ms1-trad-link.btn-aide-trad{
|
||||
}
|
||||
|
||||
/* MSIN-4379 — Cadenas + view/OK/stats ; badge auto à droite. */
|
||||
/* MSIN-4429 — colonne Début + bloc Qté/ou/Fin. */
|
||||
/* MSIN-4429 — colonnes Début | Qté | ou | Fin (alignées sur l'en-tête). */
|
||||
.epr-line{
|
||||
display:grid;
|
||||
grid-template-columns:
|
||||
40px
|
||||
40px
|
||||
58px
|
||||
minmax(148px, 1fr)
|
||||
58px
|
||||
22px
|
||||
58px
|
||||
44px
|
||||
48px
|
||||
auto
|
||||
@ -1984,7 +1986,9 @@ a.ms1-trad-link.btn-aide-trad{
|
||||
40px
|
||||
40px
|
||||
58px
|
||||
minmax(148px, 1fr)
|
||||
58px
|
||||
22px
|
||||
58px
|
||||
44px
|
||||
48px
|
||||
auto
|
||||
@ -2045,21 +2049,8 @@ a.ms1-trad-link.btn-aide-trad{
|
||||
background-color:#f1f3f5;
|
||||
}
|
||||
|
||||
/* MSIN-4429 — Qté / ou / Fin : pilote actif vs champ calculé / choix. */
|
||||
.epr-col-range-spec,
|
||||
.bib-range-spec{
|
||||
display:grid;
|
||||
grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);
|
||||
gap:6px;
|
||||
align-items:center;
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-line-header .epr-col-range-spec{
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-line-header .epr-col-range-spec > div{
|
||||
/* MSIN-4429 — colonne « ou » + états pilote / calculé sur Qté et Fin. */
|
||||
.epr-col-or{
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
@ -2073,10 +2064,11 @@ a.ms1-trad-link.btn-aide-trad{
|
||||
text-transform:lowercase;
|
||||
white-space:nowrap;
|
||||
user-select:none;
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
.bib-range-or--header{
|
||||
font-size:12px;
|
||||
.epr-line-header .epr-col-or{
|
||||
padding-top:2px;
|
||||
}
|
||||
|
||||
.bib-range-preview{
|
||||
|
||||
@ -3629,11 +3629,7 @@ function renderBibAddRangeButton($epr_id) {
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* MSIN-4429 — Bloc Qté / ou / Fin (saisie pilote + champ calculé).
|
||||
*
|
||||
* @return array{qty:int|string,start:int,end:int,has_values:bool}
|
||||
*/
|
||||
/** MSIN-4429 — Valeurs dérivées pour affichage Qté (colonne séparée de Fin). */
|
||||
function fxBibRangeSpecValues(array $range) {
|
||||
$intStart = (int)($range['epr_bib_start'] ?? 0);
|
||||
$intEnd = (int)($range['epr_bib_finish'] ?? 0);
|
||||
@ -3652,31 +3648,12 @@ function fxBibRangeSpecValues(array $range) {
|
||||
];
|
||||
}
|
||||
|
||||
/** MSIN-4429 — Inputs quantité + fin avec séparateur « ou ». */
|
||||
function fxBibRenderRangeQtyEndInputs(array $range, $blnRangeLocked) {
|
||||
$tabSpec = fxBibRangeSpecValues($range);
|
||||
$strQty = ($tabSpec['qty'] !== '') ? (int)$tabSpec['qty'] : '';
|
||||
$strEnd = ($tabSpec['end'] > 0) ? (int)$tabSpec['end'] : '';
|
||||
$strReadonly = $blnRangeLocked ? 'readonly' : '';
|
||||
|
||||
/** MSIN-4429 — Colonne « ou » entre Qté et Fin. */
|
||||
function fxBibRenderRangeOrCell() {
|
||||
ob_start();
|
||||
?>
|
||||
<div class="bib-range-spec">
|
||||
<input type="number"
|
||||
class="form-control form-control-sm bib-qty"
|
||||
min="1"
|
||||
value="<?php echo $strQty; ?>"
|
||||
placeholder="<?php echo fxBibEsc(fxBibTexte('bib_v4_range_qty_ph', 0)); ?>"
|
||||
<?php echo $strReadonly; ?>
|
||||
<?php echo fxBibAideTippyAttr('bib_v4_col_qty'); ?>>
|
||||
<span class="bib-range-or" aria-hidden="true"><?php fxBibTexte('bib_v4_range_or', 1); ?></span>
|
||||
<input type="number"
|
||||
class="form-control form-control-sm bib-end"
|
||||
min="1"
|
||||
value="<?php echo $strEnd; ?>"
|
||||
placeholder="<?php echo fxBibEsc(fxBibTexte('bib_v4_range_end_ph', 0)); ?>"
|
||||
<?php echo $strReadonly; ?>
|
||||
<?php echo fxBibAideTippyAttr('bib_v4_col_end'); ?>>
|
||||
<div class="epr-col-or" aria-hidden="true">
|
||||
<span class="bib-range-or"><?php fxBibTexte('bib_v4_range_or', 1); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
@ -3690,11 +3667,9 @@ function renderBibRangeHeader() {
|
||||
<div class="epr-col-lock"><?php echo fxBibColHeader('bib_v4_col_lock'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_view'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_start'); ?></div>
|
||||
<div class="epr-col-range-spec">
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_qty'); ?></div>
|
||||
<div class="bib-range-or bib-range-or--header" aria-hidden="true"><?php fxBibTexte('bib_v4_range_or', 1); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_end'); ?></div>
|
||||
</div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_qty'); ?></div>
|
||||
<?php echo fxBibRenderRangeOrCell(); ?>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_end'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_ok'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_del'); ?></div>
|
||||
<div class="epr-col-stats">
|
||||
@ -5235,7 +5210,23 @@ $tabSpec = fxBibRangeSpecValues($range);
|
||||
<?php echo $blnRangeLocked ? 'readonly' : ''; ?>
|
||||
<?php echo fxBibAideTippyAttr('bib_v4_col_start'); ?>>
|
||||
|
||||
<?php echo fxBibRenderRangeQtyEndInputs($range, $blnRangeLocked); ?>
|
||||
<input type="number"
|
||||
class="form-control form-control-sm bib-qty"
|
||||
min="1"
|
||||
value="<?php echo ($tabSpec['qty'] !== '') ? (int)$tabSpec['qty'] : ''; ?>"
|
||||
placeholder="<?php echo fxBibEsc(fxBibTexte('bib_v4_range_qty_ph', 0)); ?>"
|
||||
<?php echo $blnRangeLocked ? 'readonly' : ''; ?>
|
||||
<?php echo fxBibAideTippyAttr('bib_v4_col_qty'); ?>>
|
||||
|
||||
<?php echo fxBibRenderRangeOrCell(); ?>
|
||||
|
||||
<input type="number"
|
||||
class="form-control form-control-sm bib-end"
|
||||
min="1"
|
||||
value="<?php echo ($tabSpec['end'] > 0) ? (int)$tabSpec['end'] : ''; ?>"
|
||||
placeholder="<?php echo fxBibEsc(fxBibTexte('bib_v4_range_end_ph', 0)); ?>"
|
||||
<?php echo $blnRangeLocked ? 'readonly' : ''; ?>
|
||||
<?php echo fxBibAideTippyAttr('bib_v4_col_end'); ?>>
|
||||
|
||||
<?php echo fxBibBtnAideSegmentOpen(); ?>
|
||||
<button type="button"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Constantes *
|
||||
*
|
||||
**************/
|
||||
define('_VERSION_CODE', '4.72.728');
|
||||
define('_VERSION_CODE', '4.72.729');
|
||||
define('_DATE_CODE', '2026-07-07');
|
||||
//MSIN-4290
|
||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||
|
||||
@ -1 +1,74 @@
|
||||
MSIN-4429
|
||||
-- MSIN-4429 — Séquence dossards : colonne Quantité (Début → Qté ou Fin)
|
||||
-- Idempotent. Exécuter sur environnements où bib v4 est déployé.
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_col_qty', 'fr', 'Qté', 'Nombre de dossards dans la séquence. Cliquez puis saisissez la quantité ou la fin — l''autre valeur se calcule.', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_col_qty' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_col_qty', 'en', 'Qty', 'Number of bibs in the sequence. Click then enter quantity or end — the other value is calculated.', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_col_qty' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_or', 'fr', 'ou', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_or' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_or', 'en', 'or', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_or' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_start_ph', 'fr', 'Début', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_start_ph' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_start_ph', 'en', 'Start', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_start_ph' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_qty_ph', 'fr', 'Qté', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_qty_ph' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_qty_ph', 'en', 'Qty', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_qty_ph' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_end_ph', 'fr', 'Fin', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_end_ph' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_range_end_ph', 'en', 'End', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_range_end_ph' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_incomplete', 'fr', 'Entrez le début, puis cliquez sur Qté ou Fin et complétez la valeur.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_incomplete' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_incomplete', 'en', 'Enter the start, then click Qty or End and complete the value.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_incomplete' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_invalid', 'fr', 'La fin doit être supérieure ou égale au début.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_invalid' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_invalid', 'en', 'End must be greater than or equal to start.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_invalid' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_preview', 'fr', 'Séquence %d → %d · %d dossards', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_preview' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_preview', 'en', 'Sequence %d → %d · %d bibs', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_preview' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_pick_hint', 'fr', 'Cliquez sur Qté ou Fin pour choisir ce que vous voulez saisir.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_pick_hint' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
||||
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
||||
SELECT 'bib_v4_js_range_pick_hint', 'en', 'Click Qty or End to choose which value to enter.', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
||||
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_js_range_pick_hint' AND info_langue = 'en' AND info_prg = 'compte.php');
|
||||
|
||||
Reference in New Issue
Block a user