diff options
author | Steven Barth <steven@midlink.org> | 2008-08-30 20:32:13 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-30 20:32:13 +0000 |
commit | 05d6b9684c749f7e47ce5681a3e5455a9c554a69 (patch) | |
tree | bca8e4d80a0075cd878c39050fd3c5c9bb50d4ec /libs/cbi | |
parent | d5cfb28f9bc97edc628e049436167b4bccb0b700 (diff) |
libs/cbi: Make sure newly created sections have optional field selectors
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index fe207739f..5b05c4608 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -735,11 +735,12 @@ function TypedSection.parse(self) if self.addremove then -- Create + local created local crval = CREATE_PREFIX .. self.config .. "." .. self.sectiontype local name = luci.http.formvalue(crval) if self.anonymous then if name then - self:create() + created = self:create() end else if name then @@ -755,10 +756,14 @@ function TypedSection.parse(self) end if name and #name > 0 then - self:create(name) + created = self:create(name) and name end end end + + if created then + AbstractSection.parse_optionals(self, created) + end end end |