Add macros and use them

This commit is contained in:
Patrick Jentsch
2020-04-17 11:04:09 +02:00
parent 23ffbe5f6b
commit 3aafe664a3
22 changed files with 205 additions and 502 deletions

View File

@ -113,18 +113,11 @@ nopaque.Forms.init = function() {
}
form.addEventListener("submit", function(event) {
event.preventDefault();
var formData, progressModalTitleElement;
var formData;
formData = new FormData(form);
// Initialize progress modal
if (progressModalElement) {
progressModalTitleElement = progressModalElement.querySelector(".title");
for(let entry of formData.entries()) {
if (entry[0].endsWith("title")) {
progressModalTitleElement.innerText = entry[1];
break;
}
}
progressElement.style.width = "0%";
progressModal.open();
}