diff --git a/Js/fonctions.js b/Js/fonctions.js index 2f0c6a76..6dac8429 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -34432,41 +34432,41 @@ function afficher_garantie_produit() { const codeProduit = $("#codeProduit").val(); const div_cible = $('#div_garantieproduit'); const racineWeb = $("#racineWeb").val(); + const codeLangue = $("#codeLangue").val(); - // 2. Validation du Garant (avec SweetAlert2) + // 2. Validation du Garant via alert_ebene if (!codeGcAssureur || codeGcAssureur.trim() === "") { - Swal.fire({ - icon: 'warning', - title: '= _("Garant manquant") ?>', - text: '= _("Veuillez sélectionner un garant pour continuer.") ?>', - confirmButtonColor: '#212e53' - }); + let v_msg = "Garant manquant ! Veuillez sélectionner un garant pour continuer."; + let v_msg_eng = "Guarantor missing ! Please select a guarantor to continue."; + + alert_ebene(v_msg, v_msg_eng); + $("#codeGcAssureur").focus(); div_cible.html(""); return; } - // 3. Validation du Produit + // 3. Validation du Produit via alert_ebene if (!codeProduit || codeProduit.trim() === "") { - Swal.fire({ - icon: 'warning', - title: '= _("Produit manquant") ?>', - text: '= _("Veuillez sélectionner un produit !") ?>', - confirmButtonColor: '#212e53' - }); + let v_msg = "Produit manquant ! Veuillez sélectionner un produit."; + let v_msg_eng = "Product missing ! Please select a product."; + + alert_ebene(v_msg, v_msg_eng); + div_cible.html(""); return; } - // 4. Préparation des paramètres et affichage du loader "Ghost" + // 4. Préparation et affichage du loader bilingue const donnees = { codeProduit: codeProduit }; + let loadingTxt = (codeLangue === "en_US") ? "Loading the entry form..." : "Chargement du formulaire de saisie..."; div_cible.html(`