Avoid using explicitOriginalTarget on confirm-page #1331
This commit is contained in:
parent
6f4d3c4327
commit
fde32bac22
1 changed files with 6 additions and 10 deletions
|
@ -18,17 +18,13 @@ async function load() {
|
||||||
document.getElementById("current-container-name").textContent = currentContainer.name;
|
document.getElementById("current-container-name").textContent = currentContainer.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("redirect-form").addEventListener("submit", (e) => {
|
document.getElementById("confirm").addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const buttonTarget = e.explicitOriginalTarget;
|
confirmSubmit(redirectUrl, cookieStoreId);
|
||||||
switch (buttonTarget.id) {
|
});
|
||||||
case "confirm":
|
document.getElementById("deny").addEventListener("click", (e) => {
|
||||||
confirmSubmit(redirectUrl, cookieStoreId);
|
e.preventDefault();
|
||||||
break;
|
denySubmit(redirectUrl);
|
||||||
case "deny":
|
|
||||||
denySubmit(redirectUrl);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue