rez
This commit is contained in:
132
Js/fonctions.js
132
Js/fonctions.js
@@ -4354,9 +4354,8 @@ function enregistrer_modif_user_rh()
|
||||
|
||||
}
|
||||
|
||||
function creer_user_gc()
|
||||
function creer_user_rh_client()
|
||||
{
|
||||
codeGcAssureur = $("#codeGcAssureur").val();
|
||||
codeUtilisateur = $("#codeUtilisateur").val();
|
||||
codeUtilisateur = codeUtilisateur.trim();
|
||||
codeUtilisateur = supprimer_espace_string(codeUtilisateur);
|
||||
@@ -4369,10 +4368,12 @@ function creer_user_gc()
|
||||
prenoms = $("#prenoms").val();
|
||||
telephone = $("#telephone").val();
|
||||
email = $("#email").val();
|
||||
|
||||
codeProfil = $("#codeProfil").val();
|
||||
|
||||
codeLangue = $("#codeLangueUser").val();
|
||||
actVisible = $("#actVisibleUser").val();
|
||||
AffectionVisible = $("#AffectionVisibleUser").val();
|
||||
actVisible = "0";
|
||||
AffectionVisible = "0";
|
||||
|
||||
nvmdp = $("#nvmdp").val();
|
||||
cfnvmdp = $("#cfnvmdp").val();
|
||||
@@ -4387,14 +4388,6 @@ function creer_user_gc()
|
||||
return;
|
||||
}
|
||||
|
||||
if(codeGcAssureur<=" ")
|
||||
{
|
||||
v_msg="Veuillez sélectionner un garant!";
|
||||
v_msgEng="Please select a guarantor!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(codeUtilisateur<=" ")
|
||||
{
|
||||
@@ -4417,25 +4410,17 @@ function creer_user_gc()
|
||||
return;
|
||||
}
|
||||
|
||||
if (actVisible<=" ")
|
||||
if (codeProfil<=" ")
|
||||
{
|
||||
v_msg="Actes visbles oui ou non?";
|
||||
v_msgEng="Acts are visible yes or no?";
|
||||
v_msg="Le profil utilisateur est obligatoire!";
|
||||
v_msgEng="The user profile is required!";
|
||||
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#actVisibleUser").focus();
|
||||
$("#codeProfil").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (AffectionVisible<=" ")
|
||||
{
|
||||
v_msg="Affections visbles oui ou non?";
|
||||
v_msgEng="Affections are visible yes or no?";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#AffectionVisibleUser").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((codeModeEnvoiPass=="1" || codeModeEnvoiPass=="2") && (telephone <=" ") )
|
||||
{
|
||||
@@ -4499,6 +4484,7 @@ function creer_user_gc()
|
||||
donnees += '&AffectionVisible='+AffectionVisible;
|
||||
donnees += '&codeModeGenerationPass='+codeModeGenerationPass;
|
||||
donnees += '&codeModeEnvoiPass='+codeModeEnvoiPass;
|
||||
donnees += '&codeProfil=' + codeProfil;
|
||||
|
||||
v_msg="Confirmez-vous ce nouvel utilisateur?";
|
||||
v_msgEng="Do you confirm this new user?";
|
||||
@@ -4507,7 +4493,7 @@ function creer_user_gc()
|
||||
.then((isConfirmed) => {
|
||||
if (isConfirmed) {
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/creerusergc/",
|
||||
url: $("#racineWeb").val()+"Ajaxuserrhclient/creeruser/",
|
||||
type : 'post',
|
||||
data: donnees,
|
||||
error: function(errorData) {
|
||||
@@ -4665,4 +4651,96 @@ function activer_user_rh_client(codeUtilisateur)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function ajax_saisir_pass_new_user()
|
||||
{
|
||||
codeModeGenerationPass = $("#codeModeGenerationPass").val();
|
||||
|
||||
donnees = 'codeModeGenerationPass='+codeModeGenerationPass;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxsaisirpassnewuser/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
$("#div_passwd").html(data);
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
if(codeModeGenerationPass=="0")
|
||||
{
|
||||
$("#nvmdp").focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#btn_enreg").focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function controle_longeur_passe(controle)
|
||||
{
|
||||
longueur = controle.value.length;
|
||||
|
||||
if(longueur==0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(longueur<8)
|
||||
{
|
||||
v_msg="8 caractères minimum exigé!";
|
||||
v_msgEng="8 characters minmum required!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
controle.value="";
|
||||
controle.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function controle_new_pass()
|
||||
{
|
||||
if ($("#nvmdp" ).val()<=' ')
|
||||
{
|
||||
v_msg="Veuillez saisir un mot de passe!";
|
||||
v_msgEng="Please enter a password!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#nvmdp").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
longueur = $("#nvmdp").val().length;
|
||||
|
||||
if(longueur>0 && longueur<8)
|
||||
{
|
||||
v_msg="8 caractères minimum exigé!";
|
||||
v_msgEng="8 characters minmum required!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#nvmdp").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($("#cfnvmdp" ).val()!=$("#nvmdp" ).val())
|
||||
{
|
||||
v_msg="Veuillez confirmer votre mot de passe!";
|
||||
v_msgEng="Please confirm your password!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#nvmdp").focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function supprimer_espace_string(p_mot)
|
||||
{
|
||||
p_mot = p_mot.trim();
|
||||
p_mot = p_mot.replace(/ /g, "");
|
||||
return p_mot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user