diff options
author | Steven Barth <steven@midlink.org> | 2008-08-14 11:50:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-14 11:50:44 +0000 |
commit | e42779fcabec3995b87a50e233e95a2f3f7bc466 (patch) | |
tree | b6ca90c55625a8568a64fc8a1730a5089b3e86f9 /modules/admin-full/luasrc/model/cbi/admin_network | |
parent | fce110981700dfd57cd9f8c381d3bdd15ee8befd (diff) |
User interface improvements part #3
Diffstat (limited to 'modules/admin-full/luasrc/model/cbi/admin_network')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua | 11 | ||||
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 9 |
2 files changed, 15 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 b50b05cb39..1c9ae396ae 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 ae5f2aeab8..6d1fb4f391 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 - |