88 replacing all alerts in users.js
This commit is contained in:
parent
740adc5318
commit
3da374326b
@ -4,12 +4,12 @@ function changePassword() {
|
|||||||
confirmPassword = document.getElementById("confirmPassword").value
|
confirmPassword = document.getElementById("confirmPassword").value
|
||||||
|
|
||||||
if ([oldPassword.length, password.length, confirmPassword.length].includes(0)) {
|
if ([oldPassword.length, password.length, confirmPassword.length].includes(0)) {
|
||||||
alert("Заполните все поля");
|
showFeedbackMessage("Заполните все поля", MessageTypesEnum.WARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (password != confirmPassword) {
|
if (password != confirmPassword) {
|
||||||
alert("Повторный пароль введен неверно");
|
showFeedbackMessage("Повторный пароль введен неверно", MessageTypesEnum.WARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,9 +17,9 @@ function changePassword() {
|
|||||||
url:"/api/1.0/users/changePassword",
|
url:"/api/1.0/users/changePassword",
|
||||||
contentType: "application/json; charset=utf-8",
|
contentType: "application/json; charset=utf-8",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
"oldPassword": document.getElementById("oldPassword").value,
|
"oldPassword": oldPassword,
|
||||||
"password": document.getElementById("password").value,
|
"password": password,
|
||||||
"confirmPassword": document.getElementById("confirmPassword").value,
|
"confirmPassword": confirmPassword,
|
||||||
}),
|
}),
|
||||||
method: "POST",
|
method: "POST",
|
||||||
success: function() {
|
success: function() {
|
||||||
@ -39,7 +39,7 @@ function inviteUser() {
|
|||||||
|
|
||||||
|
|
||||||
if (!re.test(email)) {
|
if (!re.test(email)) {
|
||||||
alert("Некорректный почтовый ящик")
|
showFeedbackMessage("Некорректный почтовый ящик", MessageTypesEnum.WARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user