luci-app-olsr: handle empty result for non-status tables
[oweals/luci.git] / protocols / luci-proto-3g / luasrc / model / cbi / admin_network / proto_3g.lua
index bad2fa2cbd9af059d5d0b2be448a22f9354130b5..85c5cd60421d378376896d975a46c56defddf9ec 100644 (file)
@@ -1,10 +1,10 @@
--- Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
+-- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
 local map, section, net = ...
 
 local device, apn, service, pincode, username, password, dialnumber
-local ipv6, maxwait, defaultroute, metric, peerdns, dns,
+local ipv6, delay, defaultroute, metric, peerdns, dns,
       keepalive_failure, keepalive_interval, demand
 
 
@@ -47,20 +47,23 @@ dialnumber.placeholder = "*99***1#"
 
 if luci.model.network:has_ipv6() then
 
-       ipv6 = section:taboption("advanced", Flag, "ipv6",
-               translate("Enable IPv6 negotiation on the PPP link"))
+       ipv6 = section:taboption("advanced", ListValue, "ipv6",
+               translate("Obtain IPv6-Address"))
 
-       ipv6.default = ipv6.disabled
+       ipv6:value("auto", translate("Automatic"))
+       ipv6:value("0", translate("Disabled"))
+       ipv6:value("1", translate("Manual"))
+       ipv6.default = "auto"
 
 end
 
 
-maxwait = section:taboption("advanced", Value, "maxwait",
+delay = section:taboption("advanced", Value, "delay",
        translate("Modem init timeout"),
        translate("Maximum amount of seconds to wait for the modem to become ready"))
 
-maxwait.placeholder = "20"
-maxwait.datatype    = "min(1)"
+delay.placeholder = "10"
+delay.datatype    = "min(1)"
 
 
 defaultroute = section:taboption("advanced", Flag, "defaultroute",