1. Beta-Version mit Korrekturanmerkungen

This commit is contained in:
Simon Martens
2023-05-11 17:15:04 +02:00
parent 0ef63bfde4
commit fdaffb2f91
20 changed files with 240 additions and 46 deletions

View File

@@ -27,4 +27,24 @@ const USESubmit = async function (oFormElement, file = null) {
document.getElementById("ha-lds-ellipsis-load").style.display = "none";
document.getElementById("ha-filelistoutput").textContent = e;
})
}
const YEARSUBMIT = async function (oFormElement, file = null) {
let fd = new FormData(oFormElement);
document.getElementById("ha-setendyearbutton").style.pointerEvents = "none";
await fetch(oFormElement.action, {
method: 'POST',
headers: {
'RequestVerificationToken': getCookie('RequestVerificationToken')
},
body: fd
})
.then(response => response.json())
.then(json => {
document.getElementById("ha-setendyearbutton").style.pointerEvents = "auto";
location.reload();
})
.catch ((e) => {
document.getElementById("ha-setendyearbutton").style.pointerEvents = "auto";
})
}