This commit is contained in:
kek7198 2022-01-03 14:55:21 -06:00
parent f34b7cc3d1
commit 1d3d9d2935
2 changed files with 2 additions and 3 deletions

View file

@ -245,8 +245,8 @@ function submitFormAjax(e, success, error) {
xhr.open("POST", actionPath, true); xhr.open("POST", actionPath, true);
xhr.onload = function() { xhr.onload = function() {
data = JSON.parse(xhr.response);
if (xhr.status >= 200 && xhr.status < 300 && !data["error"]) { if (xhr.status >= 200 && xhr.status < 300 && !data["error"]) {
data = JSON.parse(xhr.response);
try { try {
document.getElementById('toast-post-success-text').innerText = data["message"]; document.getElementById('toast-post-success-text').innerText = data["message"];
} catch(e) { } catch(e) {
@ -262,7 +262,6 @@ function submitFormAjax(e, success, error) {
} else { } else {
try { try {
data=JSON.parse(xhr.response); data=JSON.parse(xhr.response);
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error')); var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
myToast.show(); myToast.show();
document.getElementById('toast-post-error-text').innerText = data["error"]; document.getElementById('toast-post-error-text').innerText = data["error"];

View file

@ -357,7 +357,7 @@
} }
</script> </script>
{% endif %} {% endif %}
<script src="/static/assets/CHRISTMAS/js/default.js?a=13"></script> <script src="/static/assets/CHRISTMAS/js/default.js?a=14"></script>
</body> </body>
</html> </html>