From d915e6e1d7421f366ca61bf081b6ca0d29945ec1 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 14 Aug 2008 17:16:56 +0000 Subject: Converted IPKG configuration to CBI model Removed abandoned code --- libs/cbi/luasrc/cbi.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/cbi/luasrc') 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 = -- cgit v1.2.3