From ea9e6f6f8b85126abf87dc7d7101b3d6c90d61c8 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 6 Jul 2015 11:26:00 -0400 Subject: Make searchbyextension and searchbymac use searchdevices view rather than listdevices view searchdevices view is still broken, since listdevices view changed --- provisioning-searchbymac-html.lsp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'provisioning-searchbymac-html.lsp') 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) %> -- cgit v1.2.3