feature: forum replies
feature: blurbs
This commit is contained in:
parent
ab63d4ba8d
commit
591fd38088
14 changed files with 651 additions and 290 deletions
|
|
@ -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 ?? "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue