Housekeeping changes; fixed #216

This commit is contained in:
Pinga 2025-04-18 21:28:44 +03:00
parent 334ac43b72
commit 0f24051b50
2 changed files with 8 additions and 8 deletions

View file

@ -530,7 +530,7 @@
// Keep the modal open when there's an error
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance._isShown = true;
}
@ -552,7 +552,7 @@
// ✅ Only close modal if form submission is successful
if (data.identifier) {
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance.hide();
}
@ -571,7 +571,7 @@
// ❌ Prevent modal from closing on error
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance._isShown = true; // Keep modal open
}
@ -631,7 +631,7 @@
// Close the modal
let modalElement = document.getElementById("contactModal");
if (modalElement) {
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance.hide();
}

View file

@ -664,7 +664,7 @@
// Keep the modal open when there's an error
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance._isShown = true;
}
@ -686,7 +686,7 @@
// ✅ Only close modal if form submission is successful
if (data.identifier) {
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance.hide();
}
@ -705,7 +705,7 @@
// ❌ Prevent modal from closing on error
let modalElement = document.getElementById("addContactModal");
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance._isShown = true; // Keep modal open
}
@ -765,7 +765,7 @@
// Close the modal
let modalElement = document.getElementById("contactModal");
if (modalElement) {
let modalInstance = bootstrap.Modal.getInstance(modalElement);
let modalInstance = tabler.Modal.getInstance(modalElement);
if (modalInstance) {
modalInstance.hide();
}