summaryrefslogtreecommitdiffstats
path: root/tcpproxy-listsmtpentries-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-04-17 00:40:59 +0000
committerTed Trask <ttrask01@yahoo.com>2014-04-17 00:40:59 +0000
commit81adf8a6763769157690b1e82211cbe7b960da8e (patch)
treec69f20fc220ff096b10f85f26083459e381c1372 /tcpproxy-listsmtpentries-html.lsp
parent02f08e3420245cb727783f5abe460d336f135459 (diff)
downloadacf-tcpproxy-81adf8a6763769157690b1e82211cbe7b960da8e.tar.bz2
acf-tcpproxy-81adf8a6763769157690b1e82211cbe7b960da8e.tar.xz
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'tcpproxy-listsmtpentries-html.lsp')
-rw-r--r--tcpproxy-listsmtpentries-html.lsp20
1 files changed, 13 insertions, 7 deletions
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) %>
-<h1>Interface Entries</h1>
+<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %>
<table id="listentries" class="tablesorter"><thead>
<tr>
<th>Action</th>
@@ -32,15 +32,20 @@ html = require("acf.html")
<th>Command Entry</th>
</tr>
</thead><tbody>
+<% local ipaddr = cfe({ type="hidden", value="" }) %>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for i,interface in ipairs(view.value) do %>
<tr>
<td>
- <% 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
+ %>
</td>
<td><%= html.html_escape(interface.interface) %></td>
<td><%= html.html_escape(interface.ipaddr) %></td>
@@ -48,3 +53,4 @@ html = require("acf.html")
</tr>
<% end %>
</tbody></table>
+<% htmlviewfunctions.displaysectionend(header_level) %>