diff options
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") |