luci-mod-admin-full: use "Lease time" instead of "Leasetime" as translation label
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_network / ifaces.lua
index d251b31..4fc71ce 100644 (file)
@@ -1,5 +1,5 @@
 -- Copyright 2008 Steven Barth <steven@midlink.org>
--- Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
+-- Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
 local fs = require "nixio.fs"
@@ -14,6 +14,7 @@ local has_dnsmasq  = fs.access("/etc/config/dhcp")
 local has_firewall = fs.access("/etc/config/firewall")
 
 m = Map("network", translate("Interfaces") .. " - " .. arg[1]:upper(), translate("On this page you can configure the network interfaces. You can bridge several interfaces by ticking the \"bridge interfaces\" field and enter the names of several network interfaces separated by spaces. You can also use <abbr title=\"Virtual Local Area Network\">VLAN</abbr> notation <samp>INTERFACE.VLANNR</samp> (<abbr title=\"for example\">e.g.</abbr>: <samp>eth0.1</samp>)."))
+m.redirect = luci.dispatcher.build_url("admin", "network", "network")
 m:chain("wireless")
 
 if has_firewall then
@@ -134,7 +135,7 @@ end
 
 -- dhcp setup was requested, create section and reload page
 if m:formvalue("cbid.dhcp._enable._enable") then
-       m.uci:section("dhcp", "dhcp", nil, {
+       m.uci:section("dhcp", "dhcp", arg[1], {
                interface = arg[1],
                start     = "100",
                limit     = "150",
@@ -219,6 +220,12 @@ auto.default = (net:proto() == "none") and auto.disabled or auto.enabled
 delegate = s:taboption("advanced", Flag, "delegate", translate("Use builtin IPv6-management"))
 delegate.default = delegate.enabled
 
+force_link = s:taboption("advanced", Flag, "force_link",
+       translate("Force link"),
+       translate("Set interface properties regardless of the link carrier (If set, carrier sense events do not invoke hotplug handlers)."))
+
+force_link.default = (net:proto() == "static") and force_link.enabled or force_link.disabled
+
 
 if not net:is_virtual() then
        br = s:taboption("physical", Flag, "type", translate("Bridge interfaces"), translate("creates a bridge over specified interface(s)"))
@@ -372,7 +379,7 @@ for _, field in ipairs(s.children) do
                if next(field.deps) then
                        local _, dep
                        for _, dep in ipairs(field.deps) do
-                               dep.deps.proto = net:proto()
+                               dep.proto = net:proto()
                        end
                else
                        field:depends("proto", net:proto())
@@ -438,7 +445,7 @@ if has_dnsmasq and net:proto() == "static" then
                limit.datatype = "uinteger"
                limit.default = "150"
 
-               local ltime = s:taboption("general", Value, "leasetime", translate("Leasetime"),
+               local ltime = s:taboption("general", Value, "leasetime", translate("Lease time"),
                        translate("Expiry time of leased addresses, minimum is 2 minutes (<code>2m</code>)."))
                ltime.rmempty = true
                ltime.default = "12h"
@@ -491,8 +498,9 @@ if has_dnsmasq and net:proto() == "static" then
                o:value("relay", translate("relay mode"))
                o:value("hybrid", translate("hybrid mode"))
 
-               o = s:taboption("ipv6", ListValue, "ra_management", translate("DHCPv6-Mode"))
-               o:value("", translate("stateless"))
+               o = s:taboption("ipv6", ListValue, "ra_management", translate("DHCPv6-Mode"),
+                       translate("Default is stateless + stateful"))
+               o:value("0", translate("stateless"))
                o:value("1", translate("stateless + stateful"))
                o:value("2", translate("stateful-only"))
                o:depends("dhcpv6", "server")