From 81adf8a6763769157690b1e82211cbe7b960da8e Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 17 Apr 2014 00:40:59 +0000 Subject: Changes to use new htmlviewfunctions functions --- tcpproxy-listsmtpentries-html.lsp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'tcpproxy-listsmtpentries-html.lsp') diff --git a/tcpproxy-listsmtpentries-html.lsp b/tcpproxy-listsmtpentries-html.lsp index 228aa76..372dc0b 100644 --- a/tcpproxy-listsmtpentries-html.lsp +++ b/tcpproxy-listsmtpentries-html.lsp @@ -23,7 +23,7 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"editsmtpentry", "delsmtpentry"}, session) %> -

Interface Entries

+<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> @@ -32,15 +32,20 @@ html = require("acf.html") +<% local ipaddr = cfe({ type="hidden", value="" }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %> <% for i,interface in ipairs(view.value) do %> @@ -48,3 +53,4 @@ html = require("acf.html") <% end %>
ActionCommand Entry
- <% if viewlibrary.check_permission("editsmtpentry") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpentry?ipaddr="..(interface.ipaddr or interface.interface).."&redir="..page_info.orig_action, label="Edit "} %> - <% end %> - <% if viewlibrary.check_permission("delsmtpentry") then %> - <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpentry?submit=true&ipaddr="..(interface.ipaddr or interface.interface), label="Delete "} %> - <% end %> + <% + ipaddr.value = interface.ipaddr or interface.interface + if viewlibrary.check_permission("editsmtpentry") then + htmlviewfunctions.displayitem(cfe({type="link", value={ipaddr=ipaddr, redir=redir}, label="", option="Edit", action="editsmtpentry"}), page_info, -1) + end + if viewlibrary.check_permission("delsmtpentry") then + htmlviewfunctions.displayitem(cfe({type="form", value={ipaddr=ipaddr}, label="", option="Delete", action="delsmtpentry"}), page_info, -1) + end + %> <%= html.html_escape(interface.interface) %> <%= html.html_escape(interface.ipaddr) %>
+<% htmlviewfunctions.displaysectionend(header_level) %> -- cgit v1.2.3