summaryrefslogtreecommitdiffstats
path: root/lib/viewfunctions.lua
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:21:31 +0000
commitde7503f6ac5fdfe89b2995937c4cf85751f4010a (patch)
treec0bb8f1c2df98a6e71d2321b19ba91f308b4f3bd /lib/viewfunctions.lua
parent733a51c96e6b97a725afab9923efd7ef5b509e0b (diff)
downloadacf-core-de7503f6ac5fdfe89b2995937c4cf85751f4010a.tar.bz2
acf-core-de7503f6ac5fdfe89b2995937c4cf85751f4010a.tar.xz
Fix viewfunctions to not modify values
(cherry picked from commit db798e24226b68d98bd658e057fd5d9844518a46)
Diffstat (limited to 'lib/viewfunctions.lua')
-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