summaryrefslogtreecommitdiffstats
path: root/provisioning-searchbymac-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-searchbymac-html.lsp')
-rw-r--r--provisioning-searchbymac-html.lsp16
1 files changed, 8 insertions, 8 deletions
diff --git a/provisioning-searchbymac-html.lsp b/provisioning-searchbymac-html.lsp
index c0c6dc4..eba96f8 100644
--- a/provisioning-searchbymac-html.lsp
+++ b/provisioning-searchbymac-html.lsp
@@ -24,20 +24,20 @@ html = require("acf.html")
<% htmlviewfunctions.displaycommandresults({"deletedevice", "editdevice", "editdeviceparams", "overridedeviceparams"}, session) %>
<%
+local id = cfe({type="hidden", value="device.mac"})
+local comparison = cfe({type="hidden", value="~"})
+local value = cfe({label="MAC Address"})
+local form = cfe({type="form", label="Search by MAC Address", value={id=id, comparison=comparison, value=value}, action="searchdevices", option="Search"})
+
if session.searchdevicesresult then
local data = session.searchdevicesresult
session.searchdevicesresult = nil
if data.value and data.value.result then
- local func = haserl.loadfile(page_info.viewfile:gsub("searchbymac", "listdevices"))
- func(data.value.result, viewlibrary, page_info, session)
+ form.value.result = data.value.result
end
end
-%>
-<%
-local id = cfe({type="hidden", value="device.mac"})
-local comparison = cfe({type="hidden", value="~"})
-local value = cfe({label="MAC Address"})
-htmlviewfunctions.displayitem(cfe({type="form", label="Search by MAC Address", value={id=id, comparison=comparison, value=value}, action="searchdevices", option="Search"}), page_info)
+local func = haserl.loadfile(page_info.viewfile:gsub("searchbymac", "searchdevices"))
+func(form, viewlibrary, page_info, session)
%>