fix
This commit is contained in:
parent
1214f90ba4
commit
2912afe2a0
2 changed files with 4 additions and 4 deletions
|
@ -255,13 +255,11 @@ function submitFormAjax(e, success, error) {
|
||||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
|
||||||
myToast.show();
|
myToast.show();
|
||||||
// Run success function
|
// Run success function
|
||||||
success()
|
if (success) success()
|
||||||
return true
|
return true
|
||||||
} else if (xhr.status >= 300 && xhr.status < 400) {
|
} else if (xhr.status >= 300 && xhr.status < 400) {
|
||||||
window.location.href = JSON.parse(xhr.response)["redirect"]
|
window.location.href = JSON.parse(xhr.response)["redirect"]
|
||||||
} else {
|
} else {
|
||||||
// Run error function
|
|
||||||
error()
|
|
||||||
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'));
|
||||||
|
@ -275,6 +273,8 @@ function submitFormAjax(e, success, error) {
|
||||||
myToast.show();
|
myToast.show();
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// Run error function
|
||||||
|
if (error) error()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script src="/static/assets/CHRISTMAS/js/default.js?a=27"></script>
|
<script src="/static/assets/CHRISTMAS/js/default.js?a=28"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue