summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-09-12 18:18:14 +0000
committerTed Trask <ttrask01@yahoo.com>2011-09-12 18:18:14 +0000
commitdb798e24226b68d98bd658e057fd5d9844518a46 (patch)
tree3429959a1c33558faa1f37f41c28bbb8a00c724e /lib
parent42750f022f4b2b9a9df6237c0981fdd479f4532d (diff)
downloadacf-core-db798e24226b68d98bd658e057fd5d9844518a46.tar.bz2
acf-core-db798e24226b68d98bd658e057fd5d9844518a46.tar.xz
Fix viewfunctions to not modify values
Diffstat (limited to 'lib')
-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