f
This commit is contained in:
parent
412d29824f
commit
3a9a629fbe
47 changed files with 119 additions and 116 deletions
|
@ -6,7 +6,7 @@ function formkey() {
|
|||
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
tooltipTriggerList.map(function(element){
|
||||
return new bootstrap.Tooltip(element);
|
||||
return bootstrap.Tooltip.getOrCreateInstance(element);
|
||||
});
|
||||
|
||||
function post_toast(url, reload, data) {
|
||||
|
@ -28,12 +28,12 @@ function post_toast(url, reload, data) {
|
|||
catch(e) {console.log(e)}
|
||||
if (xhr.status >= 200 && xhr.status < 300 && data && data['message']) {
|
||||
document.getElementById('toast-post-success-text').innerText = data["message"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-success')).show();
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-success')).show();
|
||||
if (reload == 1) {location.reload(true)}
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-error')).show();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue