diff options
author | Steven Barth <steven@midlink.org> | 2008-06-02 17:49:27 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-02 17:49:27 +0000 |
commit | f56890a5733b3c57d088b52bf91a77c44976ca99 (patch) | |
tree | e835d0e242cf957bc8b0d0cce1eb5551c3d4a321 /libs/cbi | |
parent | 92d76ed83603e50321f171996fc78cef0a6d3580 (diff) |
* Added native basic authentication support
* Cleanups
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/cbi.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index 42b58ce0b..178c46f03 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -579,11 +579,6 @@ function AbstractValue.render(self, s, scope) if not self.optional or self:cfgvalue(s) or self:formcreated(s) then scope = scope or {} scope.section = s - - -- fixup size for MultiValue fields - if instanceof(self, MultiValue) and self.widget == "select" and not self.size then - self.size = #self.vallist - end Node.render(self, scope) end @@ -741,6 +736,14 @@ function MultiValue.__init__(self, ...) self.delimiter = " " end +function MultiValue.render(self, ...) + if self.widget == "select" and not self.size then + self.size = #self.vallist + end + + AbstractValue.render(self, ...) +end + function MultiValue.value(self, key, val) val = val or key table.insert(self.keylist, tostring(key)) |