fix: 🚑 Fix fromSubmit deported button event handler
This commit is contained in:
parent
04d4e66918
commit
ecdcf81334
2 changed files with 12 additions and 11 deletions
|
|
@ -2,6 +2,18 @@ import type { SweetAlertResult } from "sweetalert2";
|
|||
import sweetalert from "../modules/sweetalertConfirm";
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
// Submit button clone.
|
||||
const submit = document.getElementById("formSubmit"),
|
||||
submitClone = document.getElementById("formSubmitClone");
|
||||
|
||||
if(submitClone && submit) {
|
||||
submitClone.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
submit.click();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Popup delete item.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,17 +12,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
HashToColor.generate(String(codesHashSettings.textContent), codesHashSettings);
|
||||
}
|
||||
|
||||
// Submit button clone.
|
||||
const submit = document.getElementById("formSubmit"),
|
||||
submitClone = document.getElementById("formSubmitClone");
|
||||
|
||||
if(submitClone && submit) {
|
||||
submitClone.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
submit.click();
|
||||
});
|
||||
}
|
||||
|
||||
const inputDiscountsActivated = document.querySelector("input[name=discounts_activated]") as HTMLInputElement | null;
|
||||
const inputActivatedClosePage = document.querySelector("input[name=activated_close_page]") as HTMLInputElement | null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue