summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-04-30 20:36:02 +0000
committerTed Trask <ttrask01@yahoo.com>2008-04-30 20:36:02 +0000
commit69850bd218d84b0826eff070efa4859ff7d19d38 (patch)
tree7ba688a692bcbec566735efb75bba8520d093633
parent900d6f0c2dfbec11f455d5afa405a8b1a889c0be (diff)
downloadacf-shorewall-69850bd218d84b0826eff070efa4859ff7d19d38.tar.bz2
acf-shorewall-69850bd218d84b0826eff070efa4859ff7d19d38.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/shorewall/trunk@1052 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--shorewall-controller.lua30
1 files changed, 14 insertions, 16 deletions
diff --git a/shorewall-controller.lua b/shorewall-controller.lua
index 0dd7336..4b0eba0 100644
--- a/shorewall-controller.lua
+++ b/shorewall-controller.lua
@@ -32,8 +32,6 @@ local function displaycmdmanagement(pidofstatus)
-- next CFE can be used to present the result of the previous action
management.actionresult = cfe({ name="actionresult",
label="Previous action result",
- descr="", --Content of this variable is displayed as <PRE> ... </PRE> in BLACK text
- errtxt="", --Content of this variable is displayed as <PRE> ... </PRE> in RED text
})
return management
@@ -100,7 +98,7 @@ function editrecords(self,types,record,errormessage)
-- Display save button
local cmdsave = displaycmdsave()
- cmdsave.errtxt=errormessage or ""
+ cmdsave.errtxt = errormessage
-- Display delete button
cmddelete = cfe({ name="cmddelete",
@@ -140,12 +138,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "'" .. edit[fieldnum]["value"] .. "' is not a valid option!"
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -203,12 +201,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "'" .. edit[fieldnum]["value"] .. "' is not a valid option!"
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -258,12 +256,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "'" .. edit[fieldnum]["value"] .. "' is not a valid option!"
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -287,12 +285,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "'" .. edit[fieldnum]["value"] .. "' is not a valid option!"
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -314,12 +312,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "'" .. edit[fieldnum]["value"] .. "' is not a valid option!"
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -370,12 +368,12 @@ function editrecords(self,types,record,errormessage)
for k,v in pairs(edit[fieldnum]["option"]) do
edit[fieldnum]["errtxt"] = "Attention! '" .. edit[fieldnum]["value"] .. "' could be a invalid option (or is a action defined in 'actions')."
if (tostring(v) == tostring(edit[fieldnum]["value"])) then
- edit[fieldnum]["errtxt"] = ""
+ edit[fieldnum]["errtxt"] = nil
break
end
end
-- Now add this option to the list (just to show what it was)
- if (#edit[fieldnum]["errtxt"] > 0) then
+ if (edit[fieldnum]["errtxt"]) then
table.insert(edit[fieldnum]["option"], edit[fieldnum]["value"])
end
@@ -506,7 +504,7 @@ function config(self)
- if not ((configmessage) and (#configmessage.errtxt > 0)) then
+ if not ((configmessage) and (configmessage.errtxt)) then
--Actually change the values
savesuccess, configmessage = self.model:modify_config(modify_actiontype,
self.clientdata.filename,