luci-app-mwan3: change interface enabled option to use flag cbi class
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 13 Jul 2018 12:34:28 +0000 (14:34 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Thu, 30 Aug 2018 12:44:34 +0000 (14:44 +0200)
Make mwan3 interface enable config option use cbi flag.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua

index a6570e341cebb18381409de0f4056f92e64c3c9f..d01945bf4a541b655b771bac828dcb5df9e7f21f 100644 (file)
@@ -13,10 +13,8 @@ mwan_interface = m5:section(NamedSection, arg[1], "interface", "")
 mwan_interface.addremove = false
 mwan_interface.dynamic = false
 
-enabled = mwan_interface:option(ListValue, "enabled", translate("Enabled"))
-enabled.default = "1"
-enabled:value("1", translate("Yes"))
-enabled:value("0", translate("No"))
+enabled = mwan_interface:option(Flag, "enabled", translate("Enabled"))
+enabled.default = false
 
 initial_state = mwan_interface:option(ListValue, "initial_state", translate("Initial state"),
        translate("Expect interface state on up event"))