diff options
Diffstat (limited to 'gnats-report-html.lsp')
-rw-r--r-- | gnats-report-html.lsp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gnats-report-html.lsp b/gnats-report-html.lsp index 7047653..b8a841e 100644 --- a/gnats-report-html.lsp +++ b/gnats-report-html.lsp @@ -1,6 +1,4 @@ <? local form = ... -?> -<? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") io.write(html.cfe_unpack(form)) @@ -23,15 +21,19 @@ function displayinfo(myform,tags,viewtype) if (viewtype == "viewonly") then if (val.value == "") then val.value = " " end io.write(val.value) - elseif (val.type == "radio") and (type(val.option) == "table") and (#val.option > 0) then - io.write("<span style='display:inline' class='" .. ( val.class or "") .. "'>") - for k1,v1 in pairs(val.option) do - io.write("\n\t\t\t"..tostring(v1) .. ":") - io.write("<input style='margin-right:20px;margin-left:5px;' type='radio' class='" .. ( val.class or "") .. "' name='" .. val.name .. "'") - if (tostring(val.value) == tostring(v1)) then io.write(" checked='yes'") end - io.write(" value='" .. v1 .. "'>") + elseif (val.type == "radio") and (type(val.option) == "table") then + if (#val.option > 0) then + io.write("<span style='display:inline' class='" .. ( val.class or "") .. "'>") + for k1,v1 in pairs(val.option) do + io.write("\n\t\t\t"..tostring(v1) .. ":") + io.write("<input style='margin-right:20px;margin-left:5px;' type='radio' class='" .. ( val.class or "") .. "' name='" .. val.name .. "'") + if (tostring(val.value) == tostring(v1)) then io.write(" checked='yes'") end + io.write(" value='" .. v1 .. "'>") + end + io.write("\n\t\t\t</input></span>") + else + io.write("[No options available]") end - io.write("\n\t\t\t</input></span>") else io.write(html.form[val.type](val)) end |