From a7dc057561049c3e7b754c5a12d344e1ffd329ae Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Fri, 16 Jan 2026 08:05:36 +0000 Subject: [PATCH] gg --- Controleur/ControleurAjaxchangerlangue.php | 21 +++++++++++++ Js/fonctions.js | 36 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100755 Controleur/ControleurAjaxchangerlangue.php diff --git a/Controleur/ControleurAjaxchangerlangue.php b/Controleur/ControleurAjaxchangerlangue.php new file mode 100755 index 0000000..26f67c2 --- /dev/null +++ b/Controleur/ControleurAjaxchangerlangue.php @@ -0,0 +1,21 @@ +utilisateur = new Utilisateur(); + } + + public function index() + { + } + + public function changerlangue() + { + $this->utilisateur->changerlangueutilisateur(); + } + +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 2566e1d..d276333 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -4928,3 +4928,39 @@ function retirer_un_menu_principal_profil_rh(codeMenu) } }); } + +function changer_langue() +{ + codeLangue = $("#codeLangue").val(); + + v_msg="Attention, vous serez déconnecté! Confirmez-vous le changement de langue?"; + v_msgEng="Attention, you will be logged out! Do you confirm the language change?"; + + + confirm_ebene(v_msg, v_msgEng) + .then((isConfirmed) => { + if (isConfirmed) { + // L'utilisateur a confirmé + $.ajax({ + url: $("#racineWeb").val()+"Ajaxchangerlangue/changerlangue/", + type : 'post', + // data: donnees, + error: function(errorData) + { + }, + success: function(data) + { + // $("#div_test_gabarit").html(data); + }, + complete: function() + { + window.location.assign($("#racineWeb" ).val()+"Connexion/deconnecter/"); + } + }); + } else { + // L'utilisateur a annulé + console.log("Confirmation refusée"); + } + }); + +} \ No newline at end of file