Commit c35e16d5 authored by Ted Trask's avatar Ted Trask

Cleanup HTML including removing DL/DT/DD, use tablesorter where possible, and use lowercase tags

parent 12632838
......@@ -6,7 +6,7 @@ htmlviewfunctions = require("htmlviewfunctions")
viewlibrary.dispatch_component("status")
end %>
<H1>Config</H1>
<h1>Config</h1>
<%
form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
htmlviewfunctions.displayform(form)
......
......@@ -3,28 +3,47 @@ htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
<script type="text/javascript">
if (typeof jQuery == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
}
</script>
<script type="text/javascript">
if (typeof $.tablesorter == 'undefined') {
document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>');
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#list").tablesorter({widgets: ['zebra']});
});
</script>
<% htmlviewfunctions.displaycommandresults({"editdomain", "deletedomain"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createdomain"}, session, true) %>
<h1>Configuration</h1>
<h2>Edit/View DNS server entries</h2>
<DL><TABLE>
<TR style="background:#eee;font-weight:bold;">
<TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD>
<TD style="white-space:nowrap;text-align:left;" class="header">Domain</TD>
</TR>
<table id="list" class="tablesorter"><thead>
<tr>
<th>Action</th>
<th>Domain</th>
</tr>
</thead><tbody>
<% for i,domain in ipairs(data.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
<tr>
<td>
<% io.write(html.link{value = "editdomain?domain=" .. domain.."&redir="..page_info.orig_action, label="Edit " }) %>
<% if domain ~= "@" then
io.write(html.link{value = "deletedomain?submit=true&domain=" .. domain, label="Delete " })
end %>
</TD>
<TD style="white-space:nowrap;" width="90%"><%= html.html_escape(domain) %></TD>
</TR>
</td>
<td><%= html.html_escape(domain) %></td>
</tr>
<% end %>
</TABLE></DL>
</tbody></table>
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("createdomain")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment