applications/luci-asterisk: make regster option a flag value
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 11 Jan 2009 04:49:25 +0000 (04:49 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 11 Jan 2009 04:49:25 +0000 (04:49 +0000)
applications/luci-asterisk/luasrc/model/cbi/asterisk/trunk_sip.lua

index 1337602e4289f03b325f397ad8b705a1801c21cc..28be40561268b7ff200cbd934d7657dc622ef5e0 100644 (file)
@@ -42,9 +42,9 @@ if arg[1] then
        password  = peer:option(Value, "secret", "Authorization Password")
        password.password = true
 
-       register = peer:option(ListValue, "register", "Register with peer")
-       register:value("yes", "on")
-       register:value("no", "off")
+       register = peer:option(Flag, "register", "Register with peer")
+       register.enabled  = "yes"
+       register.disabled = "no"
 
        regext = peer:option(Value, "registerextension", "Extension to register (optional)")
        regext:depends({register="yes"})