Refactor mobile registration status management to use select elements; update version code
This commit modifies the mobile registration interface to replace radio buttons with a select dropdown for participant status management. The JavaScript and CSS are updated accordingly to enhance user interaction and maintain layout consistency. The version code is incremented to 4.72.674 to reflect these changes, further improving the mobile user experience.
This commit is contained in:
@ -2579,47 +2579,21 @@ a.ms1-trad-link.btn-aide-trad{
|
|||||||
gap:8px;
|
gap:8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inscr-mobile-statut-radio{
|
.inscr-mobile-statut-select{
|
||||||
display:flex;
|
max-width:100%;
|
||||||
flex-direction:column;
|
|
||||||
gap:6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inscr-mobile-statut-option{
|
|
||||||
display:flex;
|
|
||||||
align-items:center;
|
|
||||||
gap:8px;
|
|
||||||
margin:0;
|
|
||||||
padding:8px 10px;
|
|
||||||
border:1px solid #dee2e6;
|
|
||||||
border-radius:4px;
|
|
||||||
background:#f8f9fa;
|
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
font-weight:500;
|
padding:6px 10px;
|
||||||
cursor:pointer;
|
height:auto;
|
||||||
|
min-height:34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inscr-mobile-statut-option:has(.inscr-mobile-statut-option__input:checked){
|
.inscr-mobile-field-block--statut.inscr-mobile-statut--saved .inscr-mobile-statut-select{
|
||||||
border-color:#0d6efd;
|
|
||||||
background:#e7f1ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inscr-mobile-statut-option__input{
|
|
||||||
margin:0;
|
|
||||||
flex-shrink:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inscr-mobile-statut-option__label{
|
|
||||||
flex:1;
|
|
||||||
line-height:1.3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inscr-mobile-field-block--statut.inscr-mobile-statut--saved .inscr-mobile-statut-option:has(.inscr-mobile-statut-option__input:checked){
|
|
||||||
border-color:#198754;
|
border-color:#198754;
|
||||||
background:#d1e7dd;
|
background-color:#d1e7dd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inscr-mobile-field-block--statut.inscr-mobile-statut--error{
|
.inscr-mobile-field-block--statut.inscr-mobile-statut--error .inscr-mobile-statut-select{
|
||||||
|
border-color:#dc3545;
|
||||||
animation:inscr-mobile-statut-shake .35s ease;
|
animation:inscr-mobile-statut-shake .35s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3458,12 +3458,12 @@ if ($strLangue == 'fr') {
|
|||||||
var pendingStatutXhr = null;
|
var pendingStatutXhr = null;
|
||||||
var lastStatutParId = null;
|
var lastStatutParId = null;
|
||||||
|
|
||||||
$body.on('change', '.inscr-mobile-statut-option__input', function () {
|
$body.on('change', '.inscr-mobile-statut-select', function () {
|
||||||
var $input = $(this);
|
var $select = $(this);
|
||||||
var $group = $input.closest('.inscr-mobile-statut-radio');
|
var $block = $select.closest('.inscr-mobile-field-block--statut');
|
||||||
var $block = $input.closest('.inscr-mobile-field-block--statut');
|
var intParId = $select.data('par_id');
|
||||||
var intParId = $group.data('par_id');
|
var strCode = $select.val();
|
||||||
var strCode = $input.val();
|
var strPrev = $select.data('prev');
|
||||||
|
|
||||||
if (!intParId || !strCode) {
|
if (!intParId || !strCode) {
|
||||||
return;
|
return;
|
||||||
@ -3487,20 +3487,27 @@ if ($strLangue == 'fr') {
|
|||||||
pendingStatutXhr = null;
|
pendingStatutXhr = null;
|
||||||
$preloader.fadeOut('slow');
|
$preloader.fadeOut('slow');
|
||||||
if (result && result.state === 'success') {
|
if (result && result.state === 'success') {
|
||||||
|
$select.data('prev', strCode);
|
||||||
$block.addClass('inscr-mobile-statut--saved');
|
$block.addClass('inscr-mobile-statut--saved');
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
$block.removeClass('inscr-mobile-statut--saved');
|
$block.removeClass('inscr-mobile-statut--saved');
|
||||||
}, 1200);
|
}, 1200);
|
||||||
} else {
|
} else {
|
||||||
|
$select.val(strPrev);
|
||||||
$block.addClass('inscr-mobile-statut--error');
|
$block.addClass('inscr-mobile-statut--error');
|
||||||
}
|
}
|
||||||
}, 'json').fail(function () {
|
}, 'json').fail(function () {
|
||||||
pendingStatutXhr = null;
|
pendingStatutXhr = null;
|
||||||
$preloader.fadeOut('slow');
|
$preloader.fadeOut('slow');
|
||||||
|
$select.val(strPrev);
|
||||||
$block.addClass('inscr-mobile-statut--error');
|
$block.addClass('inscr-mobile-statut--error');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
moduleInscr.querySelectorAll('.inscr-mobile-statut-select').forEach(function (el) {
|
||||||
|
el.dataset.prev = el.value;
|
||||||
|
});
|
||||||
|
|
||||||
var params = new URLSearchParams(window.location.search);
|
var params = new URLSearchParams(window.location.search);
|
||||||
if (params.get('pec_id')) {
|
if (params.get('pec_id')) {
|
||||||
moduleInscr.scrollIntoView({block: 'start'});
|
moduleInscr.scrollIntoView({block: 'start'});
|
||||||
|
|||||||
@ -220,9 +220,9 @@ function fxInscrMobileRenderStatutField($intParId, $strCurrent, $intEveId, $strL
|
|||||||
}
|
}
|
||||||
|
|
||||||
$strCurrent = fxInscrMobileResolveParStatutCourse($strCurrent);
|
$strCurrent = fxInscrMobileResolveParStatutCourse($strCurrent);
|
||||||
$strGroupName = 'inscr_statut_' . (int)$intParId;
|
$strSelectId = 'inscr_statut_' . (int)$intParId;
|
||||||
|
|
||||||
echo '<div class="inscr-mobile-statut-radio" role="radiogroup"'
|
echo '<select class="form-control rounded-0 inscr-mobile-statut-select" id="' . fxInscrMobileEsc($strSelectId) . '"'
|
||||||
. ' data-par_id="' . (int)$intParId . '"'
|
. ' data-par_id="' . (int)$intParId . '"'
|
||||||
. ' data-eve_id="' . rawurlencode(base64_encode((string)$intEveId)) . '">';
|
. ' data-eve_id="' . rawurlencode(base64_encode((string)$intEveId)) . '">';
|
||||||
|
|
||||||
@ -233,20 +233,12 @@ function fxInscrMobileRenderStatutField($intParId, $strCurrent, $intEveId, $strL
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$strInputId = $strGroupName . '_' . preg_replace('/[^a-zA-Z0-9_-]/', '_', $strCode);
|
echo '<option value="' . fxInscrMobileEsc($strCode) . '"'
|
||||||
$blnChecked = ($strCurrent === $strCode);
|
. ($strCurrent === $strCode ? ' selected' : '') . '>'
|
||||||
|
. fxInscrMobileEsc($strLabel) . '</option>';
|
||||||
echo '<label class="inscr-mobile-statut-option" for="' . fxInscrMobileEsc($strInputId) . '">';
|
|
||||||
echo '<input class="inscr-mobile-statut-option__input" type="radio"'
|
|
||||||
. ' name="' . fxInscrMobileEsc($strGroupName) . '"'
|
|
||||||
. ' id="' . fxInscrMobileEsc($strInputId) . '"'
|
|
||||||
. ' value="' . fxInscrMobileEsc($strCode) . '"'
|
|
||||||
. ($blnChecked ? ' checked' : '') . '>';
|
|
||||||
echo '<span class="inscr-mobile-statut-option__label">' . fxInscrMobileEsc($strLabel) . '</span>';
|
|
||||||
echo '</label>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>';
|
echo '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Paramètres GET pour liens (sans double-encodage). */
|
/** Paramètres GET pour liens (sans double-encodage). */
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Constantes *
|
* Constantes *
|
||||||
*
|
*
|
||||||
**************/
|
**************/
|
||||||
define('_VERSION_CODE', '4.72.673');
|
define('_VERSION_CODE', '4.72.674');
|
||||||
define('_DATE_CODE', '2026-06-18');
|
define('_DATE_CODE', '2026-06-18');
|
||||||
//MSIN-4290
|
//MSIN-4290
|
||||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||||
|
|||||||
Reference in New Issue
Block a user