diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-12 04:11:50 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-12 04:11:50 +0000 |
commit | b7413b39ead7974611f0a749240ac5383d011442 (patch) | |
tree | 8d85857b158f3cda6f143b5e872aa195fd7f9aa5 /openssl-status-html.lsp | |
parent | 6354a6d5d2a9f645bca8901edb116d6103b81d01 (diff) | |
download | acf-openssl-b7413b39ead7974611f0a749240ac5383d011442.tar.bz2 acf-openssl-b7413b39ead7974611f0a749240ac5383d011442.tar.xz |
Changes to use new htmlviewfunctions functions
Diffstat (limited to 'openssl-status-html.lsp')
-rw-r--r-- | openssl-status-html.lsp | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/openssl-status-html.lsp b/openssl-status-html.lsp index cb02df8..796d63a 100644 --- a/openssl-status-html.lsp +++ b/openssl-status-html.lsp @@ -5,32 +5,33 @@ <% htmlviewfunctions.displaycommandresults({"checkenvironment", "putcacert", "generatecacert"}, session, true) %> <% htmlviewfunctions.displaycommandresults({"install"}, session) %> -<h1>System Info</h1> <% +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.displayitem(view.value.conffile) +htmlviewfunctions.displayitem(view.value.environment) +htmlviewfunctions.displayitem(view.value.cacert) +htmlviewfunctions.displayitem(view.value.cakey) %> - <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 %> -<% htmlviewfunctions.displayitem(view.value.conffile) %> -<% htmlviewfunctions.displayitem(view.value.environment) %> -<% htmlviewfunctions.displayitem(view.value.cacert) %> -<% htmlviewfunctions.displayitem(view.value.cakey) %> -<% if not view.value.version.errtxt and not view.value.conffile.errtxt then +<% +if not view.value.version.errtxt and not view.value.conffile.errtxt then if view.value.environment.errtxt then if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("checkenvironment") then viewlibrary.dispatch_component("checkenvironment") end - elseif not view.value.cacert.errtxt and not view.value.cakey.errtxt then %> -<h1>CA Certificate contents</h1> -<pre><%= html.html_escape(view.value.cacertcontents.value) %></pre> - <% elseif viewlibrary and viewlibrary.dispatch_component then + elseif not view.value.cacert.errtxt and not view.value.cakey.errtxt then + htmlviewfunctions.displaysectionstart(view.value.cacertcontents, page_info, header_level) + print("<pre>"..html.html_escape(view.value.cacertcontents.value).."</pre>") + htmlviewfunctions.displaysectionend(header_level) + elseif viewlibrary and viewlibrary.dispatch_component then if viewlibrary.check_permission("putcacert") then viewlibrary.dispatch_component("putcacert") end @@ -38,9 +39,14 @@ if view.value.version and view.value.version.errtxt and viewlibrary.check_permis viewlibrary.dispatch_component("generatecacert") end end -end %> -<% if viewlibrary.check_permission("downloadcacert") then %> -<h1>Download CA Cert</h1> -<%= html.link{value="downloadcacert?viewtype=stream&certtype=pem", label="Download PEM"} %><br/> -<%= html.link{value="downloadcacert?viewtype=stream&certtype=der", label="Download DER"} %><br/> -<% end %> +end +%> + +<% +if viewlibrary.check_permission("downloadcacert") then + htmlviewfunctions.displaysectionstart(cfe({label="Download CA Cert"}), page_info, header_level) + htmlviewfunctions.displayitem(cfe({type="link", value={certtype=cfe({type="hidden", value="pem"}), viewtype=cfe({type="hidden", value="stream"})}, label="", option="Download PEM", action="downloadcacert"}), page_info, -1) + htmlviewfunctions.displayitem(cfe({type="link", value={certtype=cfe({type="hidden", value="der"}), viewtype=cfe({type="hidden", value="stream"})}, label="", option="Download DER", action="downloadcacert"}), page_info, -1) + htmlviewfunctions.displaysectionend(header_level) +end +%> |