diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-04-30 20:36:02 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-04-30 20:36:02 +0000 |
commit | de2694e907a97dfb6a017509d2589c186dc56e72 (patch) | |
tree | d39a4a2e71007d25457a1d32fde55a18a634bc44 | |
parent | 3240695ed965b30d68d771b9d1f2139918c1b7fc (diff) | |
download | acf-alpine-baselayout-de2694e907a97dfb6a017509d2589c186dc56e72.tar.bz2 acf-alpine-baselayout-de2694e907a97dfb6a017509d2589c186dc56e72.tar.xz |
Modified cfe, removing option, errtxt, and name, and adding label - This may break things.
Rewrote password module, adding model
Modified authenticator to make password module work
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1052 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | interfaces-model.lua | 2 | ||||
-rw-r--r-- | syslog-config-html.lsp | 8 | ||||
-rw-r--r-- | syslog-controller.lua | 4 | ||||
-rw-r--r-- | syslog-expert-html.lsp | 8 | ||||
-rw-r--r-- | syslog-model.lua | 2 | ||||
-rw-r--r-- | syslog-status-html.lsp | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/interfaces-model.lua b/interfaces-model.lua index efc5ed9..57949a3 100644 --- a/interfaces-model.lua +++ b/interfaces-model.lua @@ -271,7 +271,7 @@ iface.validate = function ( def ) -- local rc = true for k,v in pairs(def) do - if #def[k].errtxt > 0 then result = false end + if def[k].errtxt then result = false end end return result, def diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp index 7dbb76b..ff068e1 100644 --- a/syslog-config-html.lsp +++ b/syslog-config-html.lsp @@ -14,12 +14,12 @@ function informationform(myform,tags) if (myform[v]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end + if (val.errtxt) then io.write(" class='error'") end io.write(">" .. val.label .. "</DT>\n") io.write("\t\t<DD>" .. val.value .. "\n") if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end @@ -33,12 +33,12 @@ function configform(myform,tags) if (myform[v]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end + if (val.errtxt) then io.write(" class='error'") end io.write(">" .. val.label .. "</DT>\n") io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end diff --git a/syslog-controller.lua b/syslog-controller.lua index f0fb343..b592672 100644 --- a/syslog-controller.lua +++ b/syslog-controller.lua @@ -100,7 +100,7 @@ function config(self) end -- Disable management buttons if there exist errors in the config for k,v in pairs(config) do - if (config[k]["errtxt"] ~= "") then + if (config[k]["errtxt"]) then disablestart = "yes" disablestop = "yes" disablerestart = "yes" @@ -160,7 +160,7 @@ function expert(self) end -- Disable management buttons if there exist errors in the config for k,v in pairs(config) do - if (config[k]["errtxt"] ~= "") then + if (config[k]["errtxt"]) then disablestart = "yes" disablestop = "yes" disablerestart = "yes" diff --git a/syslog-expert-html.lsp b/syslog-expert-html.lsp index 0a36abb..2b1f238 100644 --- a/syslog-expert-html.lsp +++ b/syslog-expert-html.lsp @@ -13,12 +13,12 @@ function informationform(myform,tags) if (myform[v]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end + if (val.errtxt) then io.write(" class='error'") end io.write(">" .. val.label .. "</DT>\n") io.write("\t\t<DD>" .. val.value .. "\n") if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end @@ -32,12 +32,12 @@ function configform(myform,tags) if (myform[v]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end + if (val.errtxt) then io.write(" class='error'") end io.write(">" .. val.label .. "</DT>\n") io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end diff --git a/syslog-model.lua b/syslog-model.lua index 262bb17..0709883 100644 --- a/syslog-model.lua +++ b/syslog-model.lua @@ -171,7 +171,7 @@ function getconfig() -- Sum all errors into one cfe local sumerrors = "" for k,v in pairs(config) do - if (config[k]["errtxt"] ~= "") then + if (config[k]["errtxt"]) then sumerrors = sumerrors .. config[k]["errtxt"] .. "\n" end end diff --git a/syslog-status-html.lsp b/syslog-status-html.lsp index 50889f8..5b5a8f7 100644 --- a/syslog-status-html.lsp +++ b/syslog-status-html.lsp @@ -13,12 +13,12 @@ function informationform(myform,tags) if (myform[v]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then io.write(" class='error'") end + if (val.errtxt) then io.write(" class='error'") end io.write(">" .. val.label .. "</DT>\n") io.write("\t\t<DD>" .. val.value .. "\n") if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end |