diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-23 16:12:07 +0000 |
commit | d051bf48fb53481082b12a6778e7c7863f1979ca (patch) | |
tree | c36b471fe04729755c3c3bb264f2698a08505384 /provisioning-listrequests-html.lsp | |
parent | 9e6bec69bac4ee45a8355aa5993bbd3f1c71dfcf (diff) | |
download | acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.bz2 acf-provisioning-d051bf48fb53481082b12a6778e7c7863f1979ca.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'provisioning-listrequests-html.lsp')
-rw-r--r-- | provisioning-listrequests-html.lsp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/provisioning-listrequests-html.lsp b/provisioning-listrequests-html.lsp index a53e24f..2bb9338 100644 --- a/provisioning-listrequests-html.lsp +++ b/provisioning-listrequests-html.lsp @@ -48,7 +48,7 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"deleterequest", "editdevice"}, session) %> -<h1>Requests</h1> +<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Requests"}), page_info) %> <table id="list" class="tablesorter"><thead> <tr> <th>Action</th> @@ -58,24 +58,27 @@ html = require("acf.html") <th>User Agent</th> </tr> </thead><tbody> +<% local mac = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value="searchdevices" }) %> <% for k,v in ipairs( view.value ) do %> <tr> <td> + <% mac.value = v.mac %> <% if viewlibrary.check_permission("deleterequest") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleterequest?submit=true&mac="..v.mac, label="Delete ", class="deleterequest"} %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={mac=mac}, label="", option="Delete", action="deleterequest", class="deleterequest" }), page_info, -1) %> <% end %> <% if v.device_id then %> <% if viewlibrary.check_permission("searchdevices") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/searchdevices?submit=true&id=device_id&value="..v.device_id.."&redir=searchdevices", label="Search "} %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={id=cfe({type="hidden", value="device_id"}), value=cfe({type="hidden", value=v.device_id}), redir=redir}, label="", option="Search", action="searchdevices" }), page_info, -1) %> <% end %> <% else %> <% if viewlibrary.check_permission("createdevicefromrequest") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/createdevicefromrequest?submit=true&mac="..v.mac, label="Create "} %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={mac=mac}, label="", option="Create", action="createdevicefromrequest" }), page_info, -1) %> <% end %> <% end %> </td> <td> - <span style="display:none"> + <span class="hide"> <% local date = {} date.year, date.month, date.day, date.hour, date.min, date.sec, remainder = string.match(v.date, "(%d+)%-(%d+)%-(%d+) (%d+):(%d+):(%d+)") local rem = string.match(v.date, "%.%d+$") @@ -90,3 +93,4 @@ html = require("acf.html") <% end %> </tbody> </table> +<% htmlviewfunctions.displaysectionend(header_level) %> |