diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:40:59 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-17 00:40:59 +0000 |
commit | 81adf8a6763769157690b1e82211cbe7b960da8e (patch) | |
tree | c69f20fc220ff096b10f85f26083459e381c1372 /tcpproxy-smtpstatus-html.lsp | |
parent | 02f08e3420245cb727783f5abe460d336f135459 (diff) | |
download | acf-tcpproxy-81adf8a6763769157690b1e82211cbe7b960da8e.tar.bz2 acf-tcpproxy-81adf8a6763769157690b1e82211cbe7b960da8e.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'tcpproxy-smtpstatus-html.lsp')
-rw-r--r-- | tcpproxy-smtpstatus-html.lsp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tcpproxy-smtpstatus-html.lsp b/tcpproxy-smtpstatus-html.lsp index 7edf5e0..e50a954 100644 --- a/tcpproxy-smtpstatus-html.lsp +++ b/tcpproxy-smtpstatus-html.lsp @@ -6,17 +6,16 @@ html = require("acf.html") <% htmlviewfunctions.displaycommandresults({"editsmtpentry", "delsmtpentry", "editsmtpfile", "delsmtpfile"}, session) %> <% htmlviewfunctions.displaycommandresults({"createsmtpfile"}, session, true) %> -<h1>SMTP Proxy Status</h1> -<% htmlviewfunctions.displayitem(view.value.version) +<% +local header_level = htmlviewfunctions.displaysectionstart(view, page_info) +htmlviewfunctions.displayitem(view.value.version) if view.value.version and view.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then + local install = cfe({ type="form", value={}, label="Install package", option="Install", action=page_info.script.."/apk-tools/apk/install" }) + install.value.package = cfe({ type="hidden", value=view.value.version.name }) + htmlviewfunctions.displayitem(install, page_info, 0) -- header_level 0 means display inline without header +end +htmlviewfunctions.displaysectionend(header_level) %> - <div class='item'><p class='left'>Install package</p> - <div class='right'> - <form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="post"> - <input type='hidden' name='package' value='<%= html.html_escape(view.value.version.name) %>'> - <input class='submit' type='submit' name='submit' value='Install'></form> - </div></div><!-- end .item --> -<% end %> <% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("listsmtpentries") |