fix: use in-app delete confirmation dialogs
This commit is contained in:
@@ -415,17 +415,6 @@ function mountThemeToggle() {
|
||||
});
|
||||
}
|
||||
|
||||
function mountDeleteConfirmations() {
|
||||
document.querySelectorAll("[data-confirm-submit]").forEach((node) => {
|
||||
node.addEventListener("click", (event) => {
|
||||
const message = node.dataset.confirmSubmit || "Wirklich löschen?";
|
||||
if (!window.confirm(message)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
await registerServiceWorker();
|
||||
injectCsrfTokens();
|
||||
@@ -434,7 +423,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
mountDialogs();
|
||||
mountPersonalSplitSync();
|
||||
mountAnnualAmountSync();
|
||||
mountDeleteConfirmations();
|
||||
document.querySelectorAll("[data-enable-push]").forEach((node) => {
|
||||
node.addEventListener("click", async (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user