summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/viewfunctions.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua
index d7d25f8..5f923f5 100644
--- a/lib/viewfunctions.lua
+++ b/lib/viewfunctions.lua
@@ -102,12 +102,16 @@ function displayformitem(myitem, name, viewtype, header_level, group)
myitem.name = tempname
myitem.value = tempval
elseif myitem.type == "boolean" then
+ local tempval = myitem.value
if (myitem.value == true) then myitem.checked = "" end
myitem.value = "true"
io.write(html.form.checkbox(myitem) .. "\n")
+ myitem.value = tempval
elseif myitem.type == "list" then
+ local tempval = myitem.value
myitem.value = table.concat(myitem.value, "\n")
io.write(html.form.longtext(myitem) .. "\n")
+ myitem.value = tempval
else
io.write((html.form[myitem.type](myitem) or "") .. "\n")
end