feature: forum replies

feature: blurbs
This commit is contained in:
Andy Burke 2025-09-21 18:29:37 -07:00
parent ab63d4ba8d
commit 591fd38088
14 changed files with 651 additions and 290 deletions

View file

@ -22,10 +22,6 @@ function smarten_forms() {
const form_data = new FormData(form);
for (const [key, value] of form_data.entries()) {
if (key.length === 0) {
continue;
}
const input = form.querySelector(`[name="${key}"]`);
if (input.type === "file") {
@ -73,6 +69,10 @@ function smarten_forms() {
}
}
if (key.length === 0) {
continue;
}
const generator = input.getAttribute("generator");
const generated_value =
typeof generator === "string" && generator.length
@ -153,7 +153,7 @@ function smarten_forms() {
await on_reply(response_body);
}
const inputs_for_reset = form.querySelectorAll("input[reset-on-submit]");
const inputs_for_reset = form.querySelectorAll("[reset-on-submit]");
for (const input of inputs_for_reset) {
const reset_value = input.getAttribute("reset-on-submit");
input.value = reset_value ?? "";