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 9db56b53933987bdfd5ccf8d468ba715e663dbe8..eda5328cf5a99e42b9165c37bbe0a2d1f69ef641 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"