diff options
Diffstat (limited to 'modules/admin-full/luasrc')
3 files changed, 17 insertions, 5 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua index b50b05cb3..1c9ae396a 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua @@ -47,7 +47,8 @@ s:option(Flag, "dynamicdhcp").rmempty = true s:option(Value, "name", translate("name")).optional = true -s:option(Flag, "ignore").optional = true +ignore = s:option(Flag, "ignore") +ignore.optional = true s:option(Value, "netmask", translate("netmask")).optional = true @@ -58,6 +59,14 @@ for i, line in pairs(luci.util.execl("dnsmasq --help dhcp")) do s:option(Value, "dhcp"..k, v).optional = true end + +for i, n in ipairs(s.children) do + if n ~= iface and n ~= ignore then + n:depends("ignore", "") + end +end + + m2 = Map("luci_ethers", translate("luci_ethers")) s = m2:section(TypedSection, "static_lease", "") diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua index ae5f2aeab..6d1fb4f39 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -113,6 +113,11 @@ mtu.isinteger = true mac = s:option(Value, "macaddr", translate("macaddress")) mac.optional = true + +srv = s:option(Value, "server", translate("network_interface_server")) +srv:depends("proto", "pptp") +srv.rmempty = true + user = s:option(Value, "username", translate("username")) user.rmempty = true user:depends("proto", "pptp") @@ -139,10 +144,6 @@ demand.rmempty = true demand:depends("proto", "pptp") demand:depends("proto", "pppoe") -srv = s:option(Value, "server", translate("network_interface_server")) -srv:depends("proto", "pptp") -srv.rmempty = true - diff --git a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua index ae4f84b9f..4b2179a8f 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua @@ -37,8 +37,10 @@ luci.model.uci.foreach("network", "interface", mode = s:option(ListValue, "mode", translate("mode")) mode:value("ap", translate("a_w_ap")) mode:value("adhoc", translate("a_w_adhoc")) +mode:value("ahdemo", translate("a_w_ahdemo")) mode:value("sta", translate("a_w_client")) mode:value("wds", translate("a_w_wds")) +mode:value("monitor", translate("a_w_monitor")) s:option(Value, "bssid", "BSSID").optional = true |