From 45855c1af634a6b6bc60dfd9d13fc755eb1c3711 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sun, 28 Oct 2012 23:30:03 +0000 Subject: Removed unneeded views by updating CFE for autoview --- hostname-html.lsp | 8 -------- hostname-read-html.lsp | 8 ++++++++ password-edit-html.lsp | 13 ------------- password-model.lua | 6 +++--- rc-edit-html.lsp | 12 ------------ rc-model.lua | 5 +++-- 6 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 hostname-html.lsp create mode 100644 hostname-read-html.lsp delete mode 100644 password-edit-html.lsp delete mode 100644 rc-edit-html.lsp diff --git a/hostname-html.lsp b/hostname-html.lsp deleted file mode 100644 index 604d9b0..0000000 --- a/hostname-html.lsp +++ /dev/null @@ -1,8 +0,0 @@ -<% local view = ... %> -<% require("htmlviewfunctions") %> -<% html = require("acf.html") %> - -

<%= html.html_escape(view.label) %>

-
-<% htmlviewfunctions.displayitem(view) %> -
diff --git a/hostname-read-html.lsp b/hostname-read-html.lsp new file mode 100644 index 0000000..604d9b0 --- /dev/null +++ b/hostname-read-html.lsp @@ -0,0 +1,8 @@ +<% local view = ... %> +<% require("htmlviewfunctions") %> +<% html = require("acf.html") %> + +

<%= html.html_escape(view.label) %>

+
+<% htmlviewfunctions.displayitem(view) %> +
diff --git a/password-edit-html.lsp b/password-edit-html.lsp deleted file mode 100644 index 0eeddaa..0000000 --- a/password-edit-html.lsp +++ /dev/null @@ -1,13 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - form.value.password.type = "password" - form.value.password_confirm.type = "password" - local order = {"user", "password"} - htmlviewfunctions.displayform(form, order) -%> diff --git a/password-model.lua b/password-model.lua index 6b18897..126860c 100644 --- a/password-model.lua +++ b/password-model.lua @@ -7,9 +7,9 @@ require ("posix") read_password = function() pw = {} - pw.user = cfe({ label="User Name" }) - pw.password = cfe({ label="Password" }) - pw.password_confirm = cfe({ label="Password (confirm)" }) + pw.user = cfe({ label="User Name", seq=1 }) + pw.password = cfe({ type="password", label="Password", seq=2 }) + pw.password_confirm = cfe({ type="password", label="Password (confirm)", seq=3 }) return cfe({ type="group", value=pw, label="System Password" }) end diff --git a/rc-edit-html.lsp b/rc-edit-html.lsp deleted file mode 100644 index 8c7f360..0000000 --- a/rc-edit-html.lsp +++ /dev/null @@ -1,12 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -

<%= html.html_escape(form.label) %>

-<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - form.value.servicename.readonly = true - local order = {"servicename", "runlevels"} - htmlviewfunctions.displayform(form, order) -%> diff --git a/rc-model.lua b/rc-model.lua index cc502c1..213b481 100644 --- a/rc-model.lua +++ b/rc-model.lua @@ -33,8 +33,9 @@ end read_runlevels = function(self, clientdata) local servicename = clientdata.servicename local value = {} - value.servicename = cfe({ value=servicename or "", label="Service Name" }) - value.runlevels = cfe({ type="multi", value={}, label="Service Runlevels", option=runlevels }) + value.servicename = cfe({ value=servicename or "", label="Service Name", seq=1 }) + if servicename then value.servicename.readonly = true end + value.runlevels = cfe({ type="multi", value={}, label="Service Runlevels", option=runlevels, seq=2 }) -- read in the value for the servicename config = config or processinfo.read_initrunlevels() -- cgit v1.2.3