summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tinydns-html.lsp13
-rw-r--r--tinydns-model.lua8
2 files changed, 4 insertions, 17 deletions
diff --git a/tinydns-html.lsp b/tinydns-html.lsp
deleted file mode 100644
index 7b921d7..0000000
--- a/tinydns-html.lsp
+++ /dev/null
@@ -1,13 +0,0 @@
-<% local form, viewlibrary, page_info = ...
-require("htmlviewfunctions")
-html = require("acf.html")
-%>
-
-<H1><%= html.html_escape(form.label) %></H1>
-<%
- form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
- if form.value.userid then form.value.userid.readonly = true end
- if form.value.role then form.value.role.readonly = true end
- local order = { "userid", "role" }
- htmlviewfunctions.displayform(form, order)
-%>
diff --git a/tinydns-model.lua b/tinydns-model.lua
index 9c239c6..c3d192c 100644
--- a/tinydns-model.lua
+++ b/tinydns-model.lua
@@ -396,11 +396,11 @@ function getuserpermissions(self, userid)
local cnffile = {}
recursedir(configdir, cnffile)
table.sort(cnffile)
- local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed" })
+ local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed", seq=1 })
if #cnffile == 0 then
allowed.errtxt = "No domains defined"
end
- local user = cfe({ value=userid, label="User Name" })
+ local user = cfe({ value=userid, label="User Name", readonly=true, seq=0 })
local output = cfe({ type="group", value={userid=user, allowed=allowed}, label="TinyDNS Permissions" })
validateuserpermissions(self, output)
return output
@@ -426,11 +426,11 @@ function getrolepermissions(self, role)
local cnffile = {}
recursedir(configdir, cnffile)
table.sort(cnffile)
- local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed" })
+ local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed", seq=1 })
if #cnffile == 0 then
allowed.errtxt = "No domains defined"
end
- local rol = cfe({ value=role, label="Role" })
+ local rol = cfe({ value=role, label="Role", readonly=true, seq=0 })
local output = cfe({ type="group", value={role=rol, allowed=allowed}, label="TinyDNS Permissions" })
validaterolepermissions(self, output)
return output