summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-10-28 23:27:00 +0000
committerTed Trask <ttrask01@yahoo.com>2012-10-28 23:27:00 +0000
commit93311d21c48b30124f39c82304cc7c5fff251373 (patch)
tree501c6acb276975b1e928b425e8e936ff14099998
parent8c2dc86dc5e0d8519bbacf0d5e3a24c755831792 (diff)
downloadacf-did-93311d21c48b30124f39c82304cc7c5fff251373.tar.bz2
acf-did-93311d21c48b30124f39c82304cc7c5fff251373.tar.xz
Removed unneeded views by updating CFE for autoview
-rw-r--r--did-createdatabase-html.lsp11
l---------did-editrolepermissions-html.lsp1
-rw-r--r--did-edituserpermissions-html.lsp13
-rw-r--r--did-model.lua18
4 files changed, 10 insertions, 33 deletions
diff --git a/did-createdatabase-html.lsp b/did-createdatabase-html.lsp
deleted file mode 100644
index af03d56..0000000
--- a/did-createdatabase-html.lsp
+++ /dev/null
@@ -1,11 +0,0 @@
-<% local form, viewlibrary, page_info = ... %>
-<% require("htmlviewfunctions") %>
-<% html = require("acf.html") %>
-
-<H1><%= html.html_escape(form.label) %></H1>
-<%
- form.value.password.type = "password"
- form.value.password_confirm.type = "password"
- local order = { "password", "password_confirm" }
- htmlviewfunctions.displayform(form, order, nil, page_info)
-%>
diff --git a/did-editrolepermissions-html.lsp b/did-editrolepermissions-html.lsp
deleted file mode 120000
index 5ae0e9d..0000000
--- a/did-editrolepermissions-html.lsp
+++ /dev/null
@@ -1 +0,0 @@
-did-edituserpermissions-html.lsp \ No newline at end of file
diff --git a/did-edituserpermissions-html.lsp b/did-edituserpermissions-html.lsp
deleted file mode 100644
index 7b921d7..0000000
--- a/did-edituserpermissions-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/did-model.lua b/did-model.lua
index a043060..dd77d36 100644
--- a/did-model.lua
+++ b/did-model.lua
@@ -1173,8 +1173,8 @@ end
function getnewdatabase()
local database = {}
local errtxt
- database.password = cfe({ label="Password" })
- database.password_confirm = cfe({ label="Password (confirm)" })
+ database.password = cfe({ type="password", label="Password", seq=1 })
+ database.password_confirm = cfe({ type="password", label="Password (confirm)", seq=2 })
local test = testdatabase()
if test.value then
errtxt = "Database already exists!"
@@ -1341,9 +1341,10 @@ function getuserpermissions(self, userid)
local entry = auth.read_entry(self, authenticator.usertable, self.conf.prefix..self.conf.controller, userid) or ""
local restricted, allowedlist
restricted, allowedlist = parseentry(entry)
- local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line" })
- local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions" })
- local user = cfe({ value=userid, label="User Name" })
+ local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line", seq=3 })
+ local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions", seq=2 })
+ local user = cfe({ value=userid or "", label="User Name", seq=1 })
+ if userid then user.readonly=true end
local output = cfe({ type="group", value={userid=user, allowed=allowed, restricted=restrict}, label="DID Permissions" })
validateuserpermissions(self, output)
return output
@@ -1366,9 +1367,10 @@ function getrolepermissions(self, role)
local entry = auth.read_entry(self, authenticator.roletable, self.conf.prefix..self.conf.controller, role) or ""
local restricted, allowedlist
restricted, allowedlist = parseentry(entry)
- local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line" })
- local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions" })
- local rol = cfe({ value=role, label="Role" })
+ local allowed = cfe({ type="list", value=allowedlist, label="DID Permissions", descr="List one DID per line", seq=3 })
+ local restrict = cfe({ type="boolean", value=restricted, label="Enable Restrictions", seq=2 })
+ local rol = cfe({ value=role or "", label="Role", seq=1 })
+ if role then rol.readonly=true end
local output = cfe({ type="group", value={role=rol, allowed=allowed, restricted=restrict}, label="DID Permissions" })
validaterolepermissions(self, output)
return output