diff options
Diffstat (limited to 'ipsectools-listcerts-html.lsp')
-rw-r--r-- | ipsectools-listcerts-html.lsp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ipsectools-listcerts-html.lsp b/ipsectools-listcerts-html.lsp index 465d0e7..457dcf1 100644 --- a/ipsectools-listcerts-html.lsp +++ b/ipsectools-listcerts-html.lsp @@ -23,25 +23,28 @@ <% htmlviewfunctions.displaycommandresults({"deletecert"}, session) %> <% htmlviewfunctions.displaycommandresults({"uploadcert"}, session, true) %> -<h1><%= html.html_escape(view.label) %></h1> +<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> <table id="list" class="tablesorter"><thead> <tr> <th>Action</th> <th>Certificate</th> </tr> </thead><tbody> +<% local certcfe = cfe({ type="hidden", value="" }) %> <% for i,cert in ipairs(view.value) do %> <tr> <td> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deletecert?submit=true&cert="..cert, label="Delete "} %> + <% certcfe.value = cert %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={cert=certcfe}, label="", option="Delete", action="deletecert" }), page_info, -1) %> <% if not string.find(cert, "%-key") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/viewcert?cert="..cert, label="View "} %> + <% htmlviewfunctions.displayitem(cfe({type="link", value={cert=certcfe}, label="", option="View", action="viewcert" }), page_info, -1) %> <% end %> </td> <td><%= html.html_escape(cert) %></td> </tr> <% end %> </tbody></table> +<% htmlviewfunctions.displaysectionend(header_level) %> <% if viewlibrary.dispatch_component and viewlibrary.check_permission("uploadcert") then viewlibrary.dispatch_component("uploadcert") |