From b7fa26d1e954a4f9ee3a098e93aedb1831dcd65a Mon Sep 17 00:00:00 2001 From: stephan Date: Thu, 18 Jun 2026 13:35:36 -0400 Subject: [PATCH] Implement mobile registration functionality and update version code This commit introduces new routing rules in .htaccess for mobile access, adds mobile-specific PHP includes and logic in compte.php, and enhances the footer scripts for mobile page handling. Additionally, new CSS styles are added to support the mobile registration interface. The version code is incremented to 4.72.670 to reflect these changes, improving the overall user experience for mobile users. --- .htaccess | 3 + compte.php | 6 + css/style.css | 160 +++++++ inc_footer_scripts.php | 37 ++ inc_tableau_inscriptions_mobile.php | 28 ++ inc_tableau_promoteur.php | 6 + mobile.php | 88 ++++ php/inc_fx_inscriptions_mobile.php | 590 ++++++++++++++++++++++++ php/inc_settings.php | 2 +- sql/MSIN-inscriptions-mobile-phase1.sql | 40 ++ 10 files changed, 959 insertions(+), 1 deletion(-) create mode 100644 inc_tableau_inscriptions_mobile.php create mode 100644 mobile.php create mode 100644 php/inc_fx_inscriptions_mobile.php create mode 100644 sql/MSIN-inscriptions-mobile-phase1.sql diff --git a/.htaccess b/.htaccess index d8b6023..6fa414d 100644 --- a/.htaccess +++ b/.htaccess @@ -28,6 +28,9 @@ RewriteRule ^cart/([\w\-]+)/([\w\-]+)/?$ ./panier.php?lang=en&step=$1&code=$2 [N RewriteRule ^compte/?([\w\-]+)?/?$ ./compte.php?lang=fr&code=$1 [NC,QSA] RewriteRule ^account/?([\w\-]+)?/?$ ./compte.php?lang=en&code=$1 [NC,QSA] +RewriteRule ^mobile/?$ ./mobile.php?lang=fr [NC,QSA] +RewriteRule ^mobile/en/?$ ./mobile.php?lang=en [NC,QSA] + RewriteRule ^reserver/([\w\-]+)/(\d+)/?$ ./reserver.php?lang=fr&code=$1&id=$2 [NC,QSA] RewriteRule ^book/([\w\-]+)/(\d+)/?$ ./reserver.php?lang=en&code=$1&id=$2 [NC,QSA] diff --git a/compte.php b/compte.php index 4af57e4..9817bb4 100644 --- a/compte.php +++ b/compte.php @@ -21,6 +21,7 @@ require_once('php/inc_logs_course.php'); require_once('superadm/php/inc_fx_excell.php'); require_once('php/inc_fx_liste_attente.php'); +require_once('php/inc_fx_inscriptions_mobile.php'); global $objDatabase, $vPage, $vDomaine; // vérifier les paramètres @@ -701,6 +702,11 @@ require_once("inc_header.php"); $footer_script = true; include("inc_tableau_inscriptions.php"); break; + case 'compte_inc_tableau_inscriptions_mobile': + $blnBoutonRetour = false; + $footer_script = true; + include("inc_tableau_inscriptions_mobile.php"); + break; case 'compte_inc_tableau_mail_entraineurs': $blnBoutonRetour = false; $footer_script = true; diff --git a/css/style.css b/css/style.css index 4ba22a8..84e08ea 100644 --- a/css/style.css +++ b/css/style.css @@ -2310,3 +2310,163 @@ a.ms1-trad-link.btn-aide-trad{ .bib-anomalies-empty{ font-size:13px; } + +/* Inscriptions mobile (MSIN) — réutilise .epr-* bib v4 */ +.inscr-mobile-page{ + max-width:720px; +} + +.inscr-mobile-page-title{ + font-size:1.35rem; +} + +.inscr-mobile-hint{ + font-size:14px; + color:#495057; + margin-bottom:12px; +} + +.inscr-mobile-event-name{ + font-size:14px; + color:#495057; + margin:0 0 14px; +} + +.inscr-mobile-back{ + margin-bottom:8px; +} + +.inscr-mobile-panel{ + display:block; + grid-template-columns:1fr; + padding:0; + border:none; + background:transparent; +} + +.inscr-mobile-block-full{ + width:100%; + border:1px solid #b8c9e8; + border-radius:4px; + overflow:hidden; + background:#fff; +} + +.inscr-mobile-form .form-group{ + margin-bottom:12px; +} + +.inscr-mobile-form .form-group label{ + font-size:13px; + font-weight:600; + margin-bottom:4px; +} + +.inscr-mobile-form-actions{ + display:flex; + gap:10px; + flex-wrap:wrap; + margin-top:8px; +} + +.inscr-mobile-form-actions .btn{ + flex:1 1 auto; +} + +.inscr-mobile-results-meta{ + font-size:13px; + color:#495057; + margin:0 0 10px; +} + +.inscr-mobile-result-card{ + display:block; + grid-template-columns:1fr; + margin-bottom:0; +} + +.inscr-mobile-result-card--cancelled{ + border-color:#f5c6cb; +} + +.inscr-mobile-result-card__head{ + margin:0; + border-radius:0; +} + +.inscr-mobile-result-card__body{ + padding-top:10px; +} + +.inscr-mobile-result-card__race{ + font-size:14px; + font-weight:600; + margin-bottom:4px; +} + +.inscr-mobile-result-card__order{ + font-size:13px; + color:#6c757d; +} + +.inscr-mobile-event-card{ + display:flex; + align-items:center; + justify-content:space-between; + gap:12px; + color:inherit; + text-decoration:none; + cursor:pointer; +} + +.inscr-mobile-event-card:hover, +.inscr-mobile-event-card:focus{ + color:inherit; + text-decoration:none; + border-color:#2f5fd0; +} + +.inscr-mobile-event-card__title{ + font-size:16px; + font-weight:700; + color:#212529; +} + +.inscr-mobile-event-card__meta{ + font-size:13px; + color:#6c757d; + margin-top:4px; +} + +.inscr-mobile-event-card__chevron{ + color:#2f5fd0; + font-size:18px; + flex-shrink:0; +} + +.inscr-mobile-bib-row{ + display:flex; + gap:8px; + align-items:stretch; + margin-top:6px; +} + +.inscr-mobile-bib-row .form-control{ + flex:1; +} + +.inscr-mobile-actions .btn{ + margin-bottom:8px; +} + +.inscr-mobile-actions .btn:last-child{ + margin-bottom:0; +} + +#module-inscr-mobile .epr-header-label{ + color:#fff; +} + +#module-inscr-mobile .inscr-mobile-panel > .epr-block > .epr-header:not(.inscr-mobile-result-card__head){ + border-radius:0; +} diff --git a/inc_footer_scripts.php b/inc_footer_scripts.php index 6029609..8fe6de5 100644 --- a/inc_footer_scripts.php +++ b/inc_footer_scripts.php @@ -208,6 +208,7 @@ if ($strLangue == 'fr') { switch ($vPage) { case 'compte.php': + case 'mobile.php': if ($footer_script == true) { ?> @@ -530,12 +531,17 @@ if ($strLangue == 'fr') { var $btn_annuler = $("#annuler_" + $btn_id[1]); var $btn_retablir = $("#retablir_" + $btn_id[1]); var $btn_modifier = $("#modifier_" + $btn_id[1]); + var $inscrFiche = $(this).closest('.inscr-mobile-fiche'); $preloader_text.html(''); $body.css('cursor', 'wait'); $preloader.show(); $.post('/ajax_compte.php', 'a=annuler-retablir-inscription&lng=&code=' + code + '&epr_id=' + intEprId + '&pec_id=' + intPecId, function ($result) { if ($result.state == 'success') { + if ($inscrFiche.length) { + window.location.reload(); + return; + } if ($result.action == 'annuler') { $btn_annuler.toggleClass('d-none'); $btn_modifier.toggleClass('d-none'); @@ -3442,5 +3448,36 @@ if ($strLangue == 'fr') { }); } + (function () { + var moduleInscr = document.getElementById('module-inscr-mobile'); + if (!moduleInscr) { + return; + } + moduleInscr.addEventListener('click', function (e) { + var btnToggle = e.target.closest('.epr-block-toggle'); + if (!btnToggle || !moduleInscr.contains(btnToggle)) { + return; + } + var block = btnToggle.closest('.epr-block'); + if (!block) { + return; + } + var collapsed = block.classList.toggle('is-collapsed'); + btnToggle.setAttribute('aria-expanded', collapsed ? 'false' : 'true'); + var label = collapsed + ? (btnToggle.getAttribute('data-label-expand') || '') + : (btnToggle.getAttribute('data-label-collapse') || ''); + if (label) { + btnToggle.setAttribute('aria-label', label); + btnToggle.setAttribute('title', label); + } + var icon = btnToggle.querySelector('.fa'); + if (icon) { + icon.classList.toggle('fa-chevron-up', !collapsed); + icon.classList.toggle('fa-chevron-down', collapsed); + } + }); + })(); + diff --git a/inc_tableau_inscriptions_mobile.php b/inc_tableau_inscriptions_mobile.php new file mode 100644 index 0000000..54984ce --- /dev/null +++ b/inc_tableau_inscriptions_mobile.php @@ -0,0 +1,28 @@ + +'; +fxInscrMobileRun($intEveId, $strLangue); +echo ''; diff --git a/inc_tableau_promoteur.php b/inc_tableau_promoteur.php index 8c2d10b..bb0fa28 100644 --- a/inc_tableau_promoteur.php +++ b/inc_tableau_promoteur.php @@ -260,6 +260,12 @@ if ($intEveId != 0) { aria-hidden="true"> +