From 34177cbb07a07876a4efa6759b5e5c1fa6c1dd6b Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 12 Aug 2008 12:07:46 +0000 Subject: Adding dhcp host files. git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1377 ab2d0c66-481e-0410-8bed-d214d4d58bed --- dhcp-createhost-html.lsp | 1 + dhcp-edithost-html.lsp | 13 +++++++++++++ dhcp-listhosts-html.lsp | 27 +++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 120000 dhcp-createhost-html.lsp create mode 100644 dhcp-edithost-html.lsp create mode 100644 dhcp-listhosts-html.lsp 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") +%> + +

<%= form.label %>

+<% + 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") %> + +

Host Declarations

+ +
+ + + + + +<% for i,host in ipairs(view.value) do %> + + + + +<% end %> +
ActionHost
+ <%= 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 "} %> + <%= host %>
+ +
Add new host
+
" method="POST"> + +
+
-- cgit v1.2.3