gg
This commit is contained in:
parent
fc7b966ee7
commit
a7dc057561
21
Controleur/ControleurAjaxchangerlangue.php
Executable file
21
Controleur/ControleurAjaxchangerlangue.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Utilisateur.php';
|
||||
|
||||
class ControleurAjaxchangerlangue extends Controleur {
|
||||
private $utilisateur;
|
||||
|
||||
public function __construct() {
|
||||
$this->utilisateur = new Utilisateur();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
}
|
||||
|
||||
public function changerlangue()
|
||||
{
|
||||
$this->utilisateur->changerlangueutilisateur();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user