diff options
-rw-r--r-- | weblog-config-html.lsp | 9 | ||||
-rw-r--r-- | weblog-createdatabase-html.lsp | 11 | ||||
l--------- | weblog-createsource-html.lsp | 1 | ||||
-rw-r--r-- | weblog-createwatchlistentry-html.lsp | 10 | ||||
-rw-r--r-- | weblog-editsource-html.lsp | 15 | ||||
-rw-r--r-- | weblog-model.lua | 19 |
6 files changed, 10 insertions, 55 deletions
diff --git a/weblog-config-html.lsp b/weblog-config-html.lsp deleted file mode 100644 index 4d47c13..0000000 --- a/weblog-config-html.lsp +++ /dev/null @@ -1,9 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -<H1><%= html.html_escape(form.label) %></H1> -<% - htmlviewfunctions.displayform(form, nil, nil, page_info, 2) -%> diff --git a/weblog-createdatabase-html.lsp b/weblog-createdatabase-html.lsp deleted file mode 100644 index af03d56..0000000 --- a/weblog-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/weblog-createsource-html.lsp b/weblog-createsource-html.lsp deleted file mode 120000 index d076f78..0000000 --- a/weblog-createsource-html.lsp +++ /dev/null @@ -1 +0,0 @@ -weblog-editsource-html.lsp
\ No newline at end of file diff --git a/weblog-createwatchlistentry-html.lsp b/weblog-createwatchlistentry-html.lsp deleted file mode 100644 index 53c91ce..0000000 --- a/weblog-createwatchlistentry-html.lsp +++ /dev/null @@ -1,10 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -<H1><%= html.html_escape(form.label) %></H1> -<% - local order = {"clientuserid", "expiredatetime"} - htmlviewfunctions.displayform(form, order, nil, page_info) -%> diff --git a/weblog-editsource-html.lsp b/weblog-editsource-html.lsp deleted file mode 100644 index 90fa784..0000000 --- a/weblog-editsource-html.lsp +++ /dev/null @@ -1,15 +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 - form.value.passwd.type = "password" - if page_info.action == "editsource" then - form.value.sourcename.readonly = true - end - local order = {"sourcename", "enabled", "source", "method", "userid", "passwd"} - htmlviewfunctions.displayform(form, order) -%> diff --git a/weblog-model.lua b/weblog-model.lua index 9e1dac0..bdfabcb 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -698,6 +698,7 @@ function getsource(sourcename) local sourcedata = getnewsource() sourcedata.value.sourcename.value = sourcename sourcedata.value.sourcename.errtxt = "Source name does not exist" + sourcedata.value.sourcename.readonly = true local res, err = pcall(function() databaseconnect(DatabaseUser) @@ -764,13 +765,13 @@ end function getnewsource() local source = {} - source.sourcename = cfe({ label="Source Name" }) - source.method = cfe({ type="select", value="local", label="Method", option={"http", "https", "local"} }) - source.userid = cfe({ label="UserID" }) - source.passwd = cfe({ label="Password" }) - source.source = cfe({ value="/var/log", label="Source Location / Address" }) - source.tzislocal = cfe({ type="boolean", value=false, label="Using local timezone" }) - source.enabled = cfe({ type="boolean", value=false, label="Enabled" }) + source.sourcename = cfe({ label="Source Name", seq=0 }) + source.method = cfe({ type="select", value="local", label="Method", option={"http", "https", "local"}, seq=3 }) + source.userid = cfe({ label="UserID", seq=4 }) + source.passwd = cfe({ type="password", label="Password", seq=5 }) + source.source = cfe({ value="/var/log", label="Source Location / Address", seq=2 }) + source.tzislocal = cfe({ type="boolean", value=false, label="Using local timezone", seq=6 }) + source.enabled = cfe({ type="boolean", value=false, label="Enabled", seq=1 }) return cfe({ type="group", value=source, label="Source" }) end @@ -1330,8 +1331,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=0 }) + database.password_confirm = cfe({ type="password", label="Password (confirm)", seq=1 }) local test = testdatabase() if test.value then errtxt = "Database already exists!" |