diff --git a/Js/fonctions.js b/Js/fonctions.js index e74dc29..847e5eb 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -218,6 +218,7 @@ function alert_ebene(p_msg, p_msg_eng) * CONFIRMATION * Affiche une boîte de dialogue Oui/Non et retourne une promesse. */ +/* function confirm_ebene(p_msg, p_msg_eng) { const codeLangue = $("#codeLangue").val(); const message = (codeLangue === "en_US") ? p_msg_eng : p_msg; @@ -230,6 +231,21 @@ function confirm_ebene(p_msg, p_msg_eng) { cancelButtonText: codeLangue === "en_US" ? 'No' : 'Non' }).then(result => result.isConfirmed); } +*/ +function confirm_ebene(p_msg, p_msg_eng) +{ + codeLangue = $("#codeLangue").val(); + + if(codeLangue=="en_US") + { + return confirm(p_msg_eng); + } + else + { + return confirm(p_msg); + } +} + /** * SAISIE TEXTE (PROMPT) @@ -2981,10 +2997,18 @@ function incorporer_assures_inmportes() v_msg="Pas de primes! souhaitez-vous recalculer les primes?"; v_msgEng="No premiums! do you want to recalculate the premiums?"; + /* if(confirm_ebene(v_msg, v_msgEng)) { return; } + */ + confirm_ebene(v_msg, v_msgEng).then(isConfirmed => { + if (isConfirmed) { + return; + } + }); + v_msg="Notez que vous avez accepté l\'incorporation sans primes!"; v_msgEng="Note that you accepted the incorporation without premium!"; @@ -2993,7 +3017,32 @@ function incorporer_assures_inmportes() v_msg="Confirmez-vous l\'incorporation de cette liste?"; v_msgEng="Do you confirm the incorporation of this list?"; + + confirm_ebene(v_msg, v_msgEng).then(isConfirmed => { + if (isConfirmed) { + var div_attente = $('#div_liste_assure_importe'); + + div_attente.html('
' + 'Chargement en cours! Veuillez patienter...' + '