summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/status-html.lsp28
-rw-r--r--lib/htmlviewfunctions.lua14
2 files changed, 23 insertions, 19 deletions
diff --git a/app/status-html.lsp b/app/status-html.lsp
index 579cff8..9ebd3d3 100644
--- a/app/status-html.lsp
+++ b/app/status-html.lsp
@@ -5,31 +5,35 @@ require("htmlviewfunctions")
<% htmlviewfunctions.displaycommandresults({"install","edit"}, session) %>
<% htmlviewfunctions.displaycommandresults({"startstop"}, session) %>
-<H1>System Info</H1>
-<DL>
+<h1>System Info</h1>
<%
htmlviewfunctions.displayitem(data.value.status)
htmlviewfunctions.displayitem(data.value.version)
if data.value.version and data.value.version.errtxt and viewlibrary.check_permission("apk-tools/apk/install") then
%>
- <DT>Install package</DT>
- <DD><form action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="POST">
- <input type='hidden' name='package' value='<%= html.html_escape(data.value.version.name) %>'>
- <input class='submit' type='submit' name='submit' value='Install'></form></DD>
+ <div class="item">
+ <p class="left">Install package</p>
+ <form class="right" action="<%= html.html_escape(page_info.script .. "/apk-tools/apk/install") %>" method="POST">
+ <input type='hidden' name='package' value='<%= html.html_escape(data.value.version.name) %>' />
+ <input class='submit' type='submit' name='submit' value='Install' />
+ </form>
+ </div><!-- end .item -->
<%
end
htmlviewfunctions.displayitem(data.value.autostart)
if not (data.value.version and data.value.version.errtxt) and data.value.autostart and data.value.autostart.errtxt and viewlibrary.check_permission("alpine-baselayout/rc/edit") then
%>
- <DT>Enable autostart</DT>
- <DD><form action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit") %>" method="POST">
- <input type='hidden' name='servicename' value='<%= html.html_escape(data.value.autostart.name) %>'>
- <input type='hidden' name='redir' value='<%= html.html_escape(page_info.orig_action) %>'>
- <input class='submit' type='submit' value='Enable'></form></DD>
+ <div class="item">
+ <p class="left">Enable autostart</p>
+ <form class="right" action="<%= html.html_escape(page_info.script .. "/alpine-baselayout/rc/edit") %>" method="POST">
+ <input type='hidden' name='servicename' value='<%= html.html_escape(data.value.autostart.name) %>' />
+ <input type='hidden' name='redir' value='<%= html.html_escape(page_info.orig_action) %>' />
+ <input class='submit' type='submit' value='Enable' />
+ </form>
+ </div><!-- end .item -->
<% end %>
-</DL>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("startstop") then
viewlibrary.dispatch_component("startstop")
diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua
index 3db6618..4e8d4b8 100644
--- a/lib/htmlviewfunctions.lua
+++ b/lib/htmlviewfunctions.lua
@@ -53,17 +53,17 @@ function displayitem(myitem, header_level, page_info)
end
end
elseif myitem.type ~= "hidden" then
- io.write("<DT")
+ io.write("<div class='item'")
if myitem.errtxt then
myitem.class = "error"
io.write(' class="error"')
end
- io.write(">" .. html.html_escape(myitem.label) .. "</DT>\n")
- io.write("<DD>")
- io.write(string.gsub(html.html_escape(tostring(myitem.value)), "\n", "<BR>") .. "\n")
- if myitem.descr then io.write("<P CLASS='descr'>" .. string.gsub(html.html_escape(myitem.descr), "\n", "<BR>") .. "</P>\n") end
- if myitem.errtxt then io.write("<P CLASS='error'>" .. string.gsub(html.html_escape(myitem.errtxt), "\n", "<BR>") .. "</P>\n") end
- io.write("</DD>\n")
+ io.write("><p class='left'>" .. html.html_escape(myitem.label) .. "</p>")
+ io.write("<div class='right'>")
+ io.write(string.gsub(html.html_escape(tostring(myitem.value)), "\n", "<br/>") .. "\n")
+ if myitem.descr then io.write("<p>" .. string.gsub(html.html_escape(myitem.descr), "\n", "<br/>") .. "</p>") end
+ if myitem.errtxt then io.write("<p class='error'>" .. string.gsub(html.html_escape(myitem.errtxt), "\n", "<br/>") .. "</p>") end
+ io.write("</div></div><!-- end .item -->")
end
end