diff --git a/Js/fonctions.js b/Js/fonctions.js index cf4935f1..b6ffa38a 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -34710,27 +34710,28 @@ function requetes_synthese_consommation_police_export() }); } -function modifier_type_bon(idTypebon) -{ - donnees = 'idTypebon='+idTypebon; +function modifier_type_bon(idTypebon) { + let donnees = 'idTypebon=' + idTypebon; - $.ajax({ - url: $("#racineWeb").val()+"Ajaxparambons/", - type : 'post', - data: donnees, - error: function(errorData) { - }, - success: function(data) - { - donnees_retour = data; - }, - complete: function() - { - $('#div_maj_type_bon').html(donnees_retour); - } - }); + $.ajax({ + url: $("#racineWeb").val() + "Ajaxparambons/", + type: 'post', + data: donnees, + error: function(errorData) { + console.error("Erreur lors du chargement des paramètres du bon."); + }, + success: function(data) { + // 1. Injecter le contenu dans le conteneur de la modale + $('#div_maj_type_bon').html(data); + + // 2. Initialiser et afficher la modale Bootstrap + var myModal = new bootstrap.Modal(document.getElementById('div_maj_type_bon')); + myModal.show(); + } + }); } + function enregistrer_modif_type_bon() { diff --git a/Vue/Ajaxparambons/index.php b/Vue/Ajaxparambons/index.php index c17f82e9..937cae60 100755 --- a/Vue/Ajaxparambons/index.php +++ b/Vue/Ajaxparambons/index.php @@ -1,44 +1,63 @@ -
+ \ No newline at end of file diff --git a/Vue/Parambons/index.php b/Vue/Parambons/index.php index e9103907..35ed516d 100755 --- a/Vue/Parambons/index.php +++ b/Vue/Parambons/index.php @@ -29,7 +29,7 @@ - + @@ -67,7 +67,7 @@
-
+