From 25c626be4581314fbd46561dac3fd7a33f0d0e4d Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 22 Jul 2026 12:29:03 -0400 Subject: [PATCH] =?UTF-8?q?MSIN-4474=20=E2=80=94=20Implement=20return=20UR?= =?UTF-8?q?L=20preservation=20for=20event=20modifications=20and=20particip?= =?UTF-8?q?ant=20management.=20Enhance=20navigation=20logic=20to=20ensure?= =?UTF-8?q?=20users=20return=20to=20the=20original=20list=20after=20action?= =?UTF-8?q?s=20like=20save=20or=20cancel.=20Introduce=20new=20functions=20?= =?UTF-8?q?to=20validate=20and=20resolve=20return=20URLs,=20maintaining=20?= =?UTF-8?q?consistency=20across=20the=20application.=20Increment=20version?= =?UTF-8?q?=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc_footer_scripts.php | 15 ++++++++---- php/inc_fonctions.php | 51 +++++++++++++++++++++++++++++++++++++++++ php/inc_fx_panier.php | 11 ++++++--- php/inc_fx_reserver.php | 5 +++- superadm/inc_footer.php | 4 +++- 5 files changed, 77 insertions(+), 9 deletions(-) diff --git a/inc_footer_scripts.php b/inc_footer_scripts.php index 96eaea8..cc519c3 100644 --- a/inc_footer_scripts.php +++ b/inc_footer_scripts.php @@ -450,7 +450,10 @@ if ($strLangue == 'fr') { strpath = '/book/'; } - document.location.href = '' + strpath + code + '/' + intEprId + '?promoteur=1&action=mod&pec_id=' + intPecId; + // MSIN-4474 — ramener à la liste d'origine après Enregistrer / Annuler + document.location.href = '' + strpath + code + '/' + intEprId + + '?promoteur=1&action=mod&pec_id=' + intPecId + + '&return_url=' + encodeURIComponent(window.location.href); }); '; - //sl - // alert('/' + strPage + '/' + strUrl + '/' + $("#sel_epreuve").val() + '?action=mod&switch=true' + strPromoteur + '&pec_id='); - document.location.href = '/' + strPage + '/' + strUrl + '/' + $("#sel_epreuve").val() + '?action=mod&switch=true' + strPromoteur + '&pec_id='; + // MSIN-4474 — préserver return_url au switch d'épreuve + var strReturn = ''; + var $returnUrl = $("#return_url"); + if ($returnUrl.length && $returnUrl.val()) { + strReturn = '&return_url=' + encodeURIComponent($returnUrl.val()); + } + document.location.href = '/' + strPage + '/' + strUrl + '/' + $("#sel_epreuve").val() + '?action=mod&switch=true' + strPromoteur + '&pec_id=' + strReturn; }); $("#frm_participant").valid(); + - diff --git a/superadm/inc_footer.php b/superadm/inc_footer.php index 38b6f73..63b6ad4 100644 --- a/superadm/inc_footer.php +++ b/superadm/inc_footer.php @@ -90,7 +90,9 @@ if (isset($_SESSION['com_info']['com_id'])) { strpath = '/book/'; } - document.location.href = '' + strpath + code + '/' + intEprId + '?promoteur=1&action=mod&pec_id=' + intPecId; + document.location.href = '' + strpath + code + '/' + intEprId + + '?promoteur=1&action=mod&pec_id=' + intPecId + + '&return_url=' + encodeURIComponent(window.location.href); }); $('.btn_update_panier').click(function () {