turn off scheduler
This commit is contained in:
parent
04c54e6a37
commit
e6f4fdde99
@ -18,7 +18,7 @@
|
|||||||
<p>This text is available both <a href="https://www.marxists.org/archive/lenin/works/1913/mar/x01.htm" target="_blank">as text at MIA</a> and <a href="https://www.youtube.com/watch?v=MOAII71GaFY" target="_blank">as audiobook by Socialism For All</a>.</p>
|
<p>This text is available both <a href="https://www.marxists.org/archive/lenin/works/1913/mar/x01.htm" target="_blank">as text at MIA</a> and <a href="https://www.youtube.com/watch?v=MOAII71GaFY" target="_blank">as audiobook by Socialism For All</a>.</p>
|
||||||
<p>The work can be read in 20 minutes. The plan is to start the event 20 minutes <b>before</b> the announced time, to give people time to read the work, if they haven't already. Then <b>at</b> the announced time, the presentation/discussion will start. I will go through what I think are the main points, and we will use this presentation as foundation for discussion.</p>
|
<p>The work can be read in 20 minutes. The plan is to start the event 20 minutes <b>before</b> the announced time, to give people time to read the work, if they haven't already. Then <b>at</b> the announced time, the presentation/discussion will start. I will go through what I think are the main points, and we will use this presentation as foundation for discussion.</p>
|
||||||
<p>I may put some notes here afterwards...</p>
|
<p>I may put some notes here afterwards...</p>
|
||||||
<h1>Scheduler</h1>
|
<!--<h1>Scheduler</h1>
|
||||||
<div id="scheduler">
|
<div id="scheduler">
|
||||||
<p>
|
<p>
|
||||||
Select as many options as possible. I will try and find the
|
Select as many options as possible. I will try and find the
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<input type="submit" value="Submit">
|
<input type="submit" value="Submit">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>-->
|
||||||
</main>
|
</main>
|
||||||
<script></script>
|
<script></script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -85,32 +85,38 @@ async function makeScheduleTable() {
|
|||||||
scheduleTable.innerHTML = tableHtml;
|
scheduleTable.innerHTML = tableHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleForm.onsubmit = async (ev) => {
|
function initScheduler() {
|
||||||
ev.preventDefault();
|
scheduleForm.onsubmit = async (ev) => {
|
||||||
const formdata = new FormData(ev.target);
|
ev.preventDefault();
|
||||||
const data = [...formdata]
|
const formdata = new FormData(ev.target);
|
||||||
.reduce((acc, [key, val]) => ({ ...acc, [key]: val }), {});
|
const data = [...formdata]
|
||||||
if (!data.username) {
|
.reduce((acc, [key, val]) => ({ ...acc, [key]: val }), {});
|
||||||
alert("please specify username");
|
if (!data.username) {
|
||||||
return;
|
alert("please specify username");
|
||||||
}
|
return;
|
||||||
if (!data.tos) {
|
}
|
||||||
alert("please check information agreement");
|
if (!data.tos) {
|
||||||
return;
|
alert("please check information agreement");
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await fetch("/api/log", {
|
const response = await fetch("/api/log", {
|
||||||
method: "post",
|
method: "post",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
}).then((res) => res.json());
|
}).then((res) => res.json());
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
alert("submitted!");
|
alert("submitted!");
|
||||||
} else {
|
} else {
|
||||||
alert("error occured!");
|
alert("error occured!");
|
||||||
console.log(response);
|
console.log(response);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
makeScheduleTable();
|
makeScheduleTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (scheduleTable !== null && scheduleForm !== null) {
|
||||||
|
initScheduler();
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user