summaryrefslogtreecommitdiffstats
path: root/provisioning-searchdevices-html.lsp
blob: 3529448a276a837db1f6bd5607007d0163fd4784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<% local form, viewlibrary, page_info = ... 
require("viewfunctions")
%>

<% if form.value.values then %>
<H1>Device</H1>
	<DL>
<% if form.errtxt then io.write("<P CLASS='error'>" .. string.gsub(html.html_escape(form.errtxt), "\n", "<BR>") .. "</P>\n") end %>
	<DT>Device ID</DT><DD><input class="text" type="text" value="<%= html.html_escape(form.value.result.value[1].device_id) %>" readonly="true"></DD>
<H2>Parameter Values</H2>
<%
	require("session")
	val = session.serialize("values", form.value.values.value)
	val = string.gsub(val, "[^\n]*%{%}\n", "")
	print("<pre>"..val.."</pre>")
	form.value.values = nil
elseif form.value.result then
	local func = haserl.loadfile(page_info.viewfile:gsub("searchdevices", "listdevices"))
	func(form.value.result, viewlibrary, page_info, session)
%>
	</DL>
<% end %>

<H1><%= html.html_escape(form.label) %></H1>
<%
	form.value.result = nil
	displayform(form, nil, nil, page_info, 2)
%>