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.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; 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.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

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

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

Loading…
Cancel
Save