diff options
author | Ted Trask <ttrask01@yahoo.com> | 2015-07-06 11:26:00 -0400 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2015-07-06 11:26:00 -0400 |
commit | ea9e6f6f8b85126abf87dc7d7101b3d6c90d61c8 (patch) | |
tree | fa49ec53eef44d52f70b38fb434debd88b0cc45b /provisioning-searchbymac-html.lsp | |
parent | 7eda47ba7e6f00fa24d3da99bb6b82c116d03fbf (diff) | |
download | acf-provisioning-ea9e6f6f8b85126abf87dc7d7101b3d6c90d61c8.tar.bz2 acf-provisioning-ea9e6f6f8b85126abf87dc7d7101b3d6c90d61c8.tar.xz |
Make searchbyextension and searchbymac use searchdevices view rather than listdevices view
searchdevices view is still broken, since listdevices view changed
Diffstat (limited to 'provisioning-searchbymac-html.lsp')
-rw-r--r-- | provisioning-searchbymac-html.lsp | 16 |
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) %> |