local form = ... ?>
--[[ DEBUG INFORMATION
io.write("
DEBUGGING
DEBUG INFO: CFE
")
io.write(html.cfe_unpack(form))
io.write("")
--]]
?>
function displayinfo(myform,tags,viewtype)
io.write("\n
")
for k,v in pairs(tags) do
if (myform) and (myform[v]) and (myform[v]["value"]) then
local val = myform[v]
if (val.type) and not (val.type == "hidden") then
io.write("\n\t
0) then
val.class = "error"
io.write(" class='error'")
end
io.write(">" .. val.label .. "
")
io.write("\n\t\t
")
if (viewtype == "viewonly") then
io.write(val.value)
elseif (viewtype == "roles") then
for k,v in pairs(form.config.availableroles.option) do
local checked = ""
if (type(form.config.roles.option) == "table") then
for kk,vv in pairs(form.config.roles.option) do
if (v == vv) then
checked = "checked='yes'"
break
end
end
end
io.write("\n\t\t\t" ..v .. ": ")
end
else
io.write(html.form[val.type](val))
end
if (val.descr) and (#val.descr > 0) then io.write("\t\t
" .. string.gsub(val.descr, "\n", " ") .. "
\n") end
if (#val.errtxt > 0) then io.write("\t\t
" .. string.gsub(val.errtxt, "\n", " ") .. "
") end
io.write("\n\t\t
")
else
io.write(html.form[val.type](val))
end
end
end
io.write("\n