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();
+
-