* luci/libs/uvl:
- only check option dependencies if option has a value - remove option required for atheros mode in wireless scheme - breaks broadcom * luci/model/admin-full: - override section validation if we create a new network on demand
This commit is contained in:
parent
e898a0dec6
commit
a8d165a5bf
3 changed files with 41 additions and 39 deletions
|
@ -334,7 +334,6 @@ function UVL._validate_option( self, option, nodeps )
|
||||||
return false, option:error(ERR.OPT_DATATYPE(option, dt))
|
return false, option:error(ERR.OPT_DATATYPE(option, dt))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if not nodeps then
|
if not nodeps then
|
||||||
local ok, err = dependencies.check( self, option )
|
local ok, err = dependencies.check( self, option )
|
||||||
|
@ -342,6 +341,7 @@ function UVL._validate_option( self, option, nodeps )
|
||||||
option:error(err)
|
option:error(err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local ok, err = validation.check( self, option )
|
local ok, err = validation.check( self, option )
|
||||||
if not ok and STRICT_EXTERNAL_VALIDATORS then
|
if not ok and STRICT_EXTERNAL_VALIDATORS then
|
||||||
|
|
|
@ -31,7 +31,6 @@ config variable
|
||||||
option name 'mode'
|
option name 'mode'
|
||||||
option section 'wireless.wifi-device'
|
option section 'wireless.wifi-device'
|
||||||
option title 'Mode (atheros)'
|
option title 'Mode (atheros)'
|
||||||
option required true
|
|
||||||
option type enum
|
option type enum
|
||||||
list depends type=atheros
|
list depends type=atheros
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,9 @@ luci.tools.webadmin.cbi_add_networks(network)
|
||||||
|
|
||||||
function network.write(self, section, value)
|
function network.write(self, section, value)
|
||||||
if not m.uci:get("network", value) then
|
if not m.uci:get("network", value) then
|
||||||
|
-- avoid "value not defined in enum" because network is not known yet
|
||||||
|
s.override_scheme = true
|
||||||
|
|
||||||
m:chain("network")
|
m:chain("network")
|
||||||
m.uci:set("network", value, "interface")
|
m.uci:set("network", value, "interface")
|
||||||
Value.write(self, section, value)
|
Value.write(self, section, value)
|
||||||
|
|
Loading…
Reference in a new issue