Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / protocols / luci-proto-ppp / luasrc / model / cbi / admin_network / proto_pppoa.lua
index c32e282..a5f76a3 100644 (file)
@@ -1,14 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-]]--
+-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
+-- Licensed to the public under the Apache License 2.0.
 
 local map, section, net = ...
 
@@ -45,12 +36,13 @@ password.password = true
 
 
 if luci.model.network:has_ipv6() then
-
-       ipv6 = section:taboption("advanced", Flag, "ipv6",
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"),
                translate("Enable IPv6 negotiation on the PPP link"))
-
-       ipv6.default = ipv6.disabled
-
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 end
 
 
@@ -95,9 +87,6 @@ function keepalive_failure.cfgvalue(self, section)
        end
 end
 
-function keepalive_failure.write() end
-function keepalive_failure.remove() end
-
 keepalive_failure.placeholder = "0"
 keepalive_failure.datatype    = "uinteger"
 
@@ -125,6 +114,8 @@ function keepalive_interval.write(self, section, value)
 end
 
 keepalive_interval.remove      = keepalive_interval.write
+keepalive_failure.write        = keepalive_interval.write
+keepalive_failure.remove       = keepalive_interval.write
 keepalive_interval.placeholder = "5"
 keepalive_interval.datatype    = "min(1)"