modules/admin-full: Several user interface improvements

This commit is contained in:
Steven Barth 2008-08-06 10:41:47 +00:00
parent e194d33c53
commit 206bf7f253
5 changed files with 26 additions and 9 deletions

View 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

View 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

View 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%>

View 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")

View 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