From d051bf48fb53481082b12a6778e7c7863f1979ca Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 23 Apr 2014 16:12:07 +0000 Subject: Changes to use new htmlviewfunctions functions --- provisioning-listrequests-html.lsp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'provisioning-listrequests-html.lsp') 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) %> -

Requests

+<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Requests"}), page_info) %> @@ -58,24 +58,27 @@ html = require("acf.html") +<% local mac = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value="searchdevices" }) %> <% for k,v in ipairs( view.value ) do %>
ActionUser Agent
+ <% 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 %> - + <% 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 %>
+<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3