From 9bfc2f93f28ab670298839cca48d93f9dc5c67fc Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Fri, 6 Mar 2026 11:25:46 +0000 Subject: [PATCH] dsf --- Js/fonctions.js | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) 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: '', - text: '', - 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: '', - text: '', - 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(`
Loading...
-
${''}
+
${loadingTxt}
`); @@ -34476,28 +34476,26 @@ function afficher_garantie_produit() { type: 'post', data: donnees, success: function(data) { - // Injection du contenu (Tableau avec inputs de modification) div_cible.html(data); // INITIALISATION DATATABLE - // On utilise l'ID #tableSeuilsModif qui doit être présent dans le retour AJAX setTimeout(function() { const nomProduit = $("#codeProduit option:selected").text(); initSmartTable('#tableSeuilsModif', 'Modif Seuils - ' + nomProduit); }, 150); }, error: function() { + let errorTxt = (codeLangue === "en_US") ? "Technical error while retrieving the form." : "Erreur technique lors de la récupération du formulaire."; div_cible.html(` `); } }); } - function ajouter_tous_garantie_produit() { const codeProduit = $("#codeProduit").val(); const racineWeb = $("#racineWeb").val();