edit submit event listener

This commit is contained in:
Ryan Mwangi 2024-10-21 15:15:26 +03:00
parent 3204bb8a4b
commit 6c3fa294d6
1 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,13 @@ const form = document.getElementById('merge-form');
const prefix = document.getElementById(`prefix-${i}`).value; const prefix = document.getElementById(`prefix-${i}`).value;
const override = document.getElementById(`override-${i}`).checked; const override = document.getElementById(`override-${i}`).checked;
const url = document.getElementById(`url-${i}`).value; const url = document.getElementById(`url-${i}`).value;
calendarsData.push({ linkGroupName, prefix, override, url }); if (prefix && override && url) {
calendarsData.push({
prefix: prefix.value,
override: override.checked,
url: url.value
});
}
} }
fetch('/merge', { fetch('/merge', {
method: 'POST', method: 'POST',