summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi')
-rw-r--r--libs/cbi/luasrc/cbi.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index 399f48675..8816b11b7 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -140,6 +140,10 @@ function Template.__init__(self, template)
self.template = template
end
+function Template.render(self)
+ luci.template.render(self.template, {self=self})
+end
+
--[[
Map - A map describing a configuration file
@@ -260,7 +264,9 @@ function SimpleForm.parse(self, ...)
local valid = true
for i, v in ipairs(self.children) do
- valid = valid and not v.tag_missing[1] and not v.tag_invalid[1]
+ valid = valid
+ and (not v.tag_missing or not v.tag_missing[1])
+ and (not v.tag_invalid or not v.tag_invalid[1])
end
local state =