Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).catch((error) => {
// Get the error modal
var elem_cont = document.getElementById("errorModalContent");
// Update the content
elem_cont.innerHTML = `<strong>HTML ISSUE:</strong> We could not save the new requirement<hr>${error}`;
// Show the modal
//var errorModal = new bootstrap.Modal(document.getElementById('errorModal'));
var errorModal = new Modal(document.getElementById('errorModal'));
errorModal.show();
// Hide the loader
loader_elem.style.transform = "translateY(-100vh)";
});
},
}).catch(function (error) {
// Get the error modal
var elem_cont = document.getElementById("errorModalContent");
// Update the content
elem_cont.innerHTML = `<strong>Search Organisation Issue:</strong><br>${error}`;
// Show the modal
var errorModal = new bootstrap.Modal(document.getElementById('errorModal'), {
keyboard: false
})
errorModal.show();
// Hide the loader
var loader_element = document.getElementById("loader");
loader_element.style.display = "none";
});
},