From 8abdecea6bd90013fe235003c32645b8ae8af2f1 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sun, 4 Jan 2026 21:44:20 +0000 Subject: [PATCH] a --- Js/fonctions.js | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ Vue/gabarit.php | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) 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...' + '
'); + + $.ajax({ + url: $("#racineWeb").val()+"Ajaximporterlisteassure/incorpoerassuresimportes/", + type: 'POST', + // data: donnees, + success: function(data) { + v_msg="Incorporation terminée avec succès!"; + v_msgEng="Incorporation completed successfully!"; + alert_ebene(v_msg, v_msgEng); + }, + error: function(data) { + }, + complete: function() { + afficher_police_id(); + } + }); + } + }); + /* if(confirm_ebene(v_msg, v_msgEng)) { var div_attente = $('#div_liste_assure_importe'); @@ -3016,4 +3065,5 @@ function incorporer_assures_inmportes() } }); } + */ } diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 3b07be3..b2c8b58 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -635,7 +635,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte']; - +