summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-08-12 12:07:46 +0000
committerTed Trask <ttrask01@yahoo.com>2008-08-12 12:07:46 +0000
commit34177cbb07a07876a4efa6759b5e5c1fa6c1dd6b (patch)
tree8ae7a01b36e79a4f818ec626f23429d82d321c7f
parentaf2b190d33683aafc06c73b0bab1ae743e69468a (diff)
downloadacf-dhcp-34177cbb07a07876a4efa6759b5e5c1fa6c1dd6b.tar.bz2
acf-dhcp-34177cbb07a07876a4efa6759b5e5c1fa6c1dd6b.tar.xz
Adding dhcp host files.
git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1377 ab2d0c66-481e-0410-8bed-d214d4d58bed
l---------dhcp-createhost-html.lsp1
-rw-r--r--dhcp-edithost-html.lsp13
-rw-r--r--dhcp-listhosts-html.lsp27
3 files changed, 41 insertions, 0 deletions
diff --git a/dhcp-createhost-html.lsp b/dhcp-createhost-html.lsp
new file mode 120000
index 0000000..1b2c3b9
--- /dev/null
+++ b/dhcp-createhost-html.lsp
@@ -0,0 +1 @@
+dhcp-edithost-html.lsp \ No newline at end of file
diff --git a/dhcp-edithost-html.lsp b/dhcp-edithost-html.lsp
new file mode 100644
index 0000000..e02e5b3
--- /dev/null
+++ b/dhcp-edithost-html.lsp
@@ -0,0 +1,13 @@
+<% local form, viewlibrary, page_info = ...
+require("viewfunctions")
+%>
+
+<H1><%= form.label %></H1>
+<%
+ form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
+ if page_info.action == "edithost" then
+ form.value.host.contenteditable = false
+ end
+ local order = {"host", "mac", "ip"}
+ displayform(form, order)
+%>
diff --git a/dhcp-listhosts-html.lsp b/dhcp-listhosts-html.lsp
new file mode 100644
index 0000000..2ef1646
--- /dev/null
+++ b/dhcp-listhosts-html.lsp
@@ -0,0 +1,27 @@
+<% local view, viewlibrary, page_info, session = ... %>
+<% require("viewfunctions") %>
+
+<H1>Host 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">Host</TD>
+ </TR>
+<% for i,host 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.."/edithost?host="..host, label="Edit "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delhost?host="..host, label="Delete "} %>
+ </TD>
+ <TD style="white-space:nowrap;"><%= host %></TD>
+ </TR>
+<% end %>
+</TABLE>
+
+<dt>Add new host</dt>
+<dd><form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/createhost" %>" method="POST">
+<input type=submit value="New" class="submit">
+</form></dd>
+</DL>