<% local form = ... %> <% --[[ DEBUG INFORMATION io.write("

DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") --]] %> <% function displayinfo(myform,tags,viewtype) for k,v in pairs(tags) do if (myform[v]) and (myform[v]["value"]) then local val = myform[v] io.write("\n\t" .. html.html_escape(val.label) .. "") io.write("\n\t\t
") if (viewtype == "viewonly") then if not (val.value) or (val.value == "") then val.value = " " end io.write(html.html_escape(val.value)) elseif (val.type == "radio") and (type(val.option) == "table") and (#val.option > 0) then io.write("") for k1,v1 in pairs(val.option) do io.write("\n\t\t\t"..html.html_escape(tostring(v1)) .. ":") io.write("") end io.write("\n\t\t\t") else io.write(html.form[val.type](val)) end if (val.descr) and (#val.descr > 0) then io.write("\n\t\t

" .. string.gsub(html.html_escape(val.descr), "\n", "
") .. "

") end if (val.errtxt) then io.write("\n\t\t

" .. string.gsub(html.html_escape(val.errtxt), "\n", "
") .. "

") end io.write("\n\t\t
\n") end end end %>

<% io.write(html.html_escape(form["query"]["sfields"]["category"]["value"] .. "/")) io.write(html.html_escape(form["query"]["sfields"]["number"]["value"] .. ": " )) io.write(html.html_escape(form["query"]["sfields"]["synopsis"]["value"] or form["query"]["header"]["subject"]["value"] or "Qurery object")) %>

Header

<% local h = form.query.header %>
From
<%= html.html_escape(h.from.value) %>
Date
<%= html.html_escape(h.date.value) %>
Subject
<%= html.html_escape(h.subject.value) %>

Details

<% local myform = form.query.sfields local tags = { "submitter_id", "class", "release", "state", "priority", "severity", "responsible", "arrival_date", "closed_date", "last_modified", "originator", } displayinfo(myform,tags) %>
<% local myform = form.query.mfields local tags = {"organization", "environment", "description", "how_to_repeat", "fix", "release_note", } for k,v in pairs(tags) do local myform=myform[v] %>

<% io.write(html.html_escape(myform.label)) %>

<% io.write(html.form[myform.type](myform)) %>
<% end %> <% local myform = form.query["mfields"]["audit_trail"] %>

<% io.write(html.html_escape(myform.label)) %>

<% for k,v in pairs(myform.option) do io.write("\n") if (#v.label > 0) then io.write("") end for i=1,#v do io.write("") end io.write("\n
" .. html.html_escape(v.label or "Uknown") .. "
" .. html.html_escape(v[i] or "Uknown") .. "
") end %>
<% local myform = form.query.mfields local tags = {"unformatted", } for k,v in pairs(tags) do local myform=myform[v] %>

<% io.write(html.html_escape(myform.label)) %>

<% io.write(html.html_escape(myform.value)) %>
<% end %>

Save changes

<% local myform = form.query local tags = { "cmdsave", } displayinfo(myform,tags) %>