mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 14:19:39 +02:00
Fix confirm message
This commit is contained in:
parent
56ab092f6b
commit
8ba04b0330
1 changed files with 11 additions and 1 deletions
|
@ -37,7 +37,17 @@ Turbo.setConfirmMethod((message) => {
|
||||||
dialog.addEventListener(
|
dialog.addEventListener(
|
||||||
"close",
|
"close",
|
||||||
() => {
|
() => {
|
||||||
resolve(dialog.returnValue === "confirm");
|
const confirmed = dialog.returnValue === "confirm";
|
||||||
|
|
||||||
|
if (!confirmed) {
|
||||||
|
document.getElementById("turbo-confirm-title").innerHTML =
|
||||||
|
"Are you sure?";
|
||||||
|
document.getElementById("turbo-confirm-body").innerHTML =
|
||||||
|
"You will not be able to undo this decision";
|
||||||
|
document.getElementById("turbo-confirm-accept").innerHTML = "Confirm";
|
||||||
|
}
|
||||||
|
|
||||||
|
resolve(confirmed);
|
||||||
},
|
},
|
||||||
{ once: true },
|
{ once: true },
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue