summaryrefslogtreecommitdiff
path: root/lupin/anmeldelse.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lupin/anmeldelse.lua')
-rw-r--r--lupin/anmeldelse.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/lupin/anmeldelse.lua b/lupin/anmeldelse.lua
new file mode 100644
index 0000000..37a441b
--- /dev/null
+++ b/lupin/anmeldelse.lua
@@ -0,0 +1,22 @@
+local artikkel = blueprint("anmeldelse")
+
+function artikkel.env(data)
+ data.terningkast = os.getenv("POST_terningkast") or ""
+ data.publisert = os.getenv("POST_publisert") or ""
+end
+
+function artikkel.form(body, data)
+ html.p()
+ html.label("Overskrift:")
+ html.text('title', data.title, 32)
+ html.p()
+ html.label("Terningkast:")
+ html.p(data.terningkast)
+ html.select('terningkast', { 1, 2, 3, 4, 5, 6 }, data.terningkast or 1)
+ html.p()
+ html.textarea('tekst', body)
+ html.hidden('type', 'anmeldelse')
+end
+
+return artikkel
+