applications/luci-olsr: redirect to interface config when adding a new if
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 02:01:38 +0000 (02:01 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 02:01:38 +0000 (02:01 +0000)
applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua

index 9db56b5..eda5328 100644 (file)
@@ -273,6 +273,11 @@ ifs.anonymous = true
 ifs.extedit   = luci.dispatcher.build_url("admin/services/olsrd/iface/%s")
 ifs.template  = "cbi/tblsection"
 
+function ifs.create(...)
+       local sid = TypedSection.create(...)
+       luci.http.redirect(ifs.extedit % sid)
+end
+
 ign = ifs:option(Flag, "ignore", translate("Enable"))
 ign.enabled  = "0"
 ign.disabled = "1"