summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-06 10:41:47 +0000
committerSteven Barth <steven@midlink.org>2008-08-06 10:41:47 +0000
commit206bf7f253b8e136d0d5f375bd9b5c352462c1e6 (patch)
treefcbc965168292e29718c114402db6e329ba5769f
parente194d33c532b353cdc3602897fde7312d6e27af7 (diff)
modules/admin-full: Several user interface improvements
-rw-r--r--i18n/english/luasrc/i18n/admin-core.en.lua4
-rw-r--r--i18n/german/luasrc/i18n/admin-core.de.lua4
-rw-r--r--libs/cbi/luasrc/view/cbi/value.htm4
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua14
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua9
5 files changed, 26 insertions, 9 deletions
diff --git a/i18n/english/luasrc/i18n/admin-core.en.lua b/i18n/english/luasrc/i18n/admin-core.en.lua
index e3889153b..4a293d881 100644
--- a/i18n/english/luasrc/i18n/admin-core.en.lua
+++ b/i18n/english/luasrc/i18n/admin-core.en.lua
@@ -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
diff --git a/i18n/german/luasrc/i18n/admin-core.de.lua b/i18n/german/luasrc/i18n/admin-core.de.lua
index 93c0cbcc8..5522fd210 100644
--- a/i18n/german/luasrc/i18n/admin-core.de.lua
+++ b/i18n/german/luasrc/i18n/admin-core.de.lua
@@ -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
diff --git a/libs/cbi/luasrc/view/cbi/value.htm b/libs/cbi/luasrc/view/cbi/value.htm
index 4d473bf5e..777d48093 100644
--- a/libs/cbi/luasrc/view/cbi/value.htm
+++ b/libs/cbi/luasrc/view/cbi/value.htm
@@ -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%>
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 8afe05103..b8a7dd34a 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
@@ -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")
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua
index 565edb7fd..7fd7135ff 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/ptp.lua
@@ -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