modules/admin-full: Several user interface improvements
authorSteven Barth <steven@midlink.org>
Wed, 6 Aug 2008 10:41:47 +0000 (10:41 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 6 Aug 2008 10:41:47 +0000 (10:41 +0000)
i18n/english/luasrc/i18n/admin-core.en.lua
i18n/german/luasrc/i18n/admin-core.de.lua
libs/cbi/luasrc/view/cbi/value.htm
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua

index e3889153ba316f4482cb80d84402b324fcfa01b7..4a293d881d17c134bdf394d4329641f8c76115a7 100644 (file)
@@ -239,9 +239,9 @@ a_n_ptp1 = [[Point-to-Point connections with PPPoE or PPTP are often used to con
 over DSL or similar technologies to an internet access point.]]
 network_interface_server = "PPTP-Server"
 network_interface_demand = "Automatic Disconnect"
-network_interface_demand_desc = "Time after which an unused connection will be closed"
+network_interface_demand_desc = "Time (in s) after which an unused connection will be closed"
 network_interface_keepalive = "Keep-Alive"
-network_interface_keepalive_desc = "Reconnect lost connections"
+network_interface_keepalive_desc = "Number of failed connection tests to initiate automatic reconnect"
 
 a_n_routes = "Static Routes"
 a_n_routes1 = [[With Static Routes you can specify through which
index 93c0cbcc806c2f256d121b31d3e468f1bed69c77..5522fd21062796f4e5d4ef77d373323288ebe249 100644 (file)
@@ -226,9 +226,9 @@ link = [[Verb.]]
 luci_ethers = "Statische Einträge"
 
 network_interface_demand = [[Automatische Trennung]]
-network_interface_demand_desc = [[Zeit nach der die Verbindung bei Inaktivität getrennt wird]]
+network_interface_demand_desc = [[Zeit (in s) nach der die Verbindung bei Inaktivität getrennt wird]]
 network_interface_keepalive = [[Keep-Alive]]
-network_interface_keepalive_desc = [[Bei einer Verbindungstrennung automatisch neu verbinden]]
+network_interface_keepalive_desc = [[Anzahl fehlgeschlagener Verbindungstests nach der automatisch neu verbunden wird]]
 network_interface_server = [[PPTP-Server]]
 network_switch_desc = [[Die zu einem VLAN gehörenden Schnittstellen
 werden durch Leerzeichen getrennt. Die Schnittstelle mit der höchsten Nummer (meistens 5) bildet
index 4d473bf5e633c1574f6de205bbef1263ea8fada2..777d48093782f0fa1d02325b53966e594924bda3 100644 (file)
@@ -24,7 +24,9 @@ $Id$
                <%-
                        end
                -%>
-               }, '<%:cbi_select%>', '<%:cbi_manual%>');
+               }, '<%- if not self.rmempty and not self.optional then -%>
+                       <%-:cbi_select-%>
+               <%- end -%>', '<%:cbi_manual%>');
        </script>
        <% end -%>
 <%+cbi/valuefooter%>
index 8afe0510307b07bc391d5fa4f73c64b6648bb813..b8a7dd34ae4d29ce704ccd564b054c440c9ef129 100644 (file)
@@ -28,11 +28,21 @@ br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1"
 br.enabled = "bridge"
 br.rmempty = true
 
-s:option(Value, "ifname", translate("interface")).rmempty = true
+ifname = s:option(Value, "ifname", translate("interface"))
+ifname.rmempty = true
+for i,d in ipairs(luci.sys.net.devices()) do
+       if d ~= "lo" then
+               ifname:value(d)
+       end
+end
 
 s:option(Value, "ipaddr", translate("ipaddress"))
 
-s:option(Value, "netmask", translate("netmask")):depends("proto", "static")
+nm = s:option(Value, "netmask", translate("netmask"))
+nm:depends("proto", "static")
+nm:value("255.255.255.0")
+nm:value("255.255.0.0")
+nm:value("255.0.0.0")
 
 gw = s:option(Value, "gateway", translate("gateway"))
 gw:depends("proto", "static")
index 565edb7fd782f067f37fb4ec2921005e1a21308b..7fd7135ffde3dd9d1f4adebc6cc03b01a3d7afe6 100644 (file)
@@ -23,7 +23,12 @@ p:value("pppoe", "PPPoE")
 p:value("pptp", "PPTP")
 p.default = "pppoe"
 
-s:option(Value, "ifname", translate("interface"))
+ifname = s:option(Value, "ifname", translate("interface"))
+for i,d in ipairs(luci.sys.net.devices()) do
+       if d ~= "lo" then
+               ifname:value(d)
+       end
+end
 
 s:option(Value, "username", translate("username"))
 s:option(Value, "password", translate("password"))
@@ -34,7 +39,7 @@ s:option(Value, "demand").optional = true
 
 srv = s:option(Value, "server")
 srv:depends("proto", "pptp")
-srv.optional = true
+srv.rmempty = true
 
 mtu = s:option(Value, "mtu", "MTU")
 mtu.optional = true