summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js8
-rw-r--r--build.py3
-rw-r--r--ka.js2
3 files changed, 8 insertions, 5 deletions
diff --git a/app.js b/app.js
index 49fd24b..f335dba 100644
--- a/app.js
+++ b/app.js
@@ -88,11 +88,13 @@
let inp = input("text")
.$attr("id","form__"+f.id)
.$attr("name",f.id)
- .$attr("required",!!f.required)
.$value(state[f.id]??null)
.$change2state(state, f.id);
+ if (f.required) {
+ inp.$attr("required","required");
+ }
if (f.pattern) {
- inp.$attr("pattern", f.pattern??null);
+ inp.$attr("pattern", f.pattern);
}
if (f.invalidmsg) {
inp.oninvalid = () => inp.setCustomValidity(f.invalidmsg);
@@ -155,4 +157,4 @@
mount(app, CApp);
loadconfig();
-})()
+})();
diff --git a/build.py b/build.py
index e0b0134..9c9531a 100644
--- a/build.py
+++ b/build.py
@@ -21,7 +21,8 @@ print(f"""
#include <avr/pgmspace.h>
#include "webif-fs.h"
-const char index_html_data[] PROGMEM = {{ {out} }};
+static const char index_html[] PROGMEM = {{ {out} }};
+PGM_P index_html_data = index_html;
uint16_t index_html_size = {len(data)};
""")
diff --git a/ka.js b/ka.js
index 843a152..7882e65 100644
--- a/ka.js
+++ b/ka.js
@@ -59,4 +59,4 @@ let {entries,fromEntries} = Object;
window.addEventListener("hashchange", reload);
root.reload = reload;
};
-})()
+})();