summaryrefslogtreecommitdiffstats
path: root/dhcp-listsubnets-html.lsp
blob: cfefa6becf01f971246a7360be099eac54f82be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<% local view, viewlibrary, page_info, session = ... %>
<% htmlviewfunctions = require("htmlviewfunctions") %>
<% html = require("acf.html") %>

<% htmlviewfunctions.displaycommandresults({"editsubnet", "delsubnet", "createsubnet"}, session) %>

<H1>Subnet Declarations</H1>

<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">Subnet</TD>
	</TR>
<% for i,subnet in ipairs(view.value) do %>
	<TR>
		<TD style="padding-right:20px;white-space:nowrap;">
			<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsubnet?subnet="..subnet.."&redir="..page_info.orig_action, label="Edit "} %>
			<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsubnet?submit=true&subnet="..subnet, label="Delete "} %>
		</TD>
		<TD style="white-space:nowrap;"><%= html.html_escape(subnet) %></TD>
	</TR>
<% end %>
</TABLE>
		
<dt>Add new subnet</dt>
<dd><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. "/createsubnet") %>" method="POST">
<input class="hidden" type="hidden"  name="redir"  value="<%= html.html_escape(page_info.orig_action) %>" >
<input type=submit value="New" class="submit">
</form></dd>
</DL>