projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7d3619
)
cbi.lua: Implement "readonly" property for "Value"
author
Christian Schoenebeck
<
[email protected]
>
Sat, 31 Oct 2015 22:09:40 +0000
(23:09 +0100)
committer
Christian Schoenebeck
<
[email protected]
>
Sat, 31 Oct 2015 22:09:40 +0000
(23:09 +0100)
cbi.lua: Implement "readonly" property for "Value"
Signed-off-by: Christian Schoenebeck <
[email protected]
>
modules/luci-base/luasrc/cbi.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/cbi.lua
b/modules/luci-base/luasrc/cbi.lua
index 1aa00eed9e8aeb2e1bc588203015033f5082fb5a..b5b2c8d8f201b5ca1cd3aec091720adfc83a0074 100644
(file)
--- a/
modules/luci-base/luasrc/cbi.lua
+++ b/
modules/luci-base/luasrc/cbi.lua
@@
-1471,6
+1471,7
@@
function Value.__init__(self, ...)
self.template = "cbi/value"
self.keylist = {}
self.vallist = {}
+ self.readonly = nil
end
function Value.reset_values(self)
@@
-1484,6
+1485,10
@@
function Value.value(self, key, val)
table.insert(self.vallist, tostring(val))
end
+function Value.parse(self, section, novld)
+ if self.readonly then return end
+ AbstractValue.parse(self, section, novld)
+end
-- DummyValue - This does nothing except being there
DummyValue = class(AbstractValue)