Hi,
The Documentation/CBI - LuCI page shows that the "depends" parameter is linked with "OR". Is there a way to link them with "AND"??
I have a case where, for example my uci file is called "otra".
config mysection
option speed 'Fast'
option mode 'Manual'
option foo 'the_foo_val'
option foo2 'myfoo2'
In my ../model/cbi/otra.lua file
x = s:option(Value, "foo", "Ask for foo value only if Speed is fast and mode is auto")
x:depends("speed", "Fast")
x:depends("mode", "Auto")
Since it's linked with "OR" if either speed == Fast OR mode == Auto", the GUI will display the request for the foo value. I really only want the question asked if both conditions are true.
Would it be better to use a function to get the uci values then combine them. Similar to something like
function x.cfgvalue(self,s)
speedval = self.map:get(s, "speed")
modeval = self.map:get(s, "mode")
end