summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-10-28 02:54:50 +0000
committerTed Trask <ttrask01@yahoo.com>2012-10-28 02:54:50 +0000
commit6e5f36530eef27b8685d8a2f2c06da6961028700 (patch)
treeffc7bb83390570af7265ab318381b2f31005b981
parentc77cbf98b3ad5a85bcf0b515889f3d961654d79d (diff)
downloadacf-openntpd-6e5f36530eef27b8685d8a2f2c06da6961028700.tar.bz2
acf-openntpd-6e5f36530eef27b8685d8a2f2c06da6961028700.tar.xz
Cleaned up config view by updating CFE for autoview
-rw-r--r--openntpd-config-html.lsp7
-rw-r--r--openntpd-model.lua8
2 files changed, 5 insertions, 10 deletions
diff --git a/openntpd-config-html.lsp b/openntpd-config-html.lsp
index b6d6b55..b478495 100644
--- a/openntpd-config-html.lsp
+++ b/openntpd-config-html.lsp
@@ -7,9 +7,4 @@ html = require("acf.html")
viewlibrary.dispatch_component("status")
end %>
-<H1><%= html.html_escape(form.label) %></H1>
-<%
- form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
- local order = { "setstimeonstartup", "listen", "server", "servers" }
- htmlviewfunctions.displayform(form, order)
-%>
+<% htmlviewfunctions.displayitem(form, 1, page_info) %>
diff --git a/openntpd-model.lua b/openntpd-model.lua
index 097eba2..746db69 100644
--- a/openntpd-model.lua
+++ b/openntpd-model.lua
@@ -75,10 +75,10 @@ end
function read_config ()
local config = {}
- config.server = cfe({ type="list", value={}, label="Single servers", descr="List of server IP addresses/hostnames. OpenNTPD will attempt to synchronize to one resolved address for each hostname entry." })
- config.servers = cfe({ type="list", value={}, label="Multiple servers", descr="List of server IP addresses/hostnames. OpenNTPD will attempt to synchronize to all resolved addresses for each hostname entry." })
- config.listen = cfe({ type="list", value={}, label="Addresses to listen on", descr="List of IP addresses/hostnames to listen on. '*' means listen on all local addresses." })
- config.setstimeonstartup = cfe({ type="boolean", value=false, label="Set time on startup" })
+ config.server = cfe({ type="list", value={}, label="Single servers", descr="List of server IP addresses/hostnames. OpenNTPD will attempt to synchronize to one resolved address for each hostname entry.", seq=3 })
+ config.servers = cfe({ type="list", value={}, label="Multiple servers", descr="List of server IP addresses/hostnames. OpenNTPD will attempt to synchronize to all resolved addresses for each hostname entry.", seq=4 })
+ config.listen = cfe({ type="list", value={}, label="Addresses to listen on", descr="List of IP addresses/hostnames to listen on. '*' means listen on all local addresses.", seq=2 })
+ config.setstimeonstartup = cfe({ type="boolean", value=false, label="Set time on startup", seq=1 })
local conf = format.parse_linesandwords(fs.read_file(configfile) or "")
for i,line in ipairs(conf) do