87 using showFeedBackMessage

merge-requests/95/head
Artem.Arefev 5 years ago
parent 76d3adb464
commit 7163937a53

@ -4,6 +4,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@ -24,10 +24,11 @@ function changePassword() {
method: "POST",
success: function() {
document.getElementById("closeModalPassword").click();
alert("Пароль был обновлен");
showFeedbackMessage("Пароль был обновлен", MessageTypesEnum.SUCCESS)
},
error: function(errorData) {
alert(errorData.responseJSON.error.message)
showFeedbackMessage(errorData.responseJSON.error.message, MessageTypesEnum.WARNING)
}
})
}
@ -48,10 +49,10 @@ function inviteUser() {
method: "POST",
success: function() {
document.getElementById("closeModalInvite").click();
alert("Пользователь был успешно приглашен");
showFeedbackMessage("Пользователь был успешно приглашен", MessageTypesEnum.SUCCESS)
},
error: function(errorData) {
alert(errorData.responseJSON.error.message)
showFeedbackMessage(errorData.responseJSON.error.message, MessageTypesEnum.WARNING)
}
})
}

@ -3,6 +3,7 @@
<head th:fragment="headerfiles">
<meta charset="UTF-8"/>
<script src="js/users.js"></script>
<script src="js/core.js"></script>
</head>
<body>
<div id="inviteModal" class="modal fade text-center">

Loading…
Cancel
Save