- .. translate("For further information ")
- .. [[<a href="https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md" target="_blank">]]
- .. translate("see online documentation")
- .. [[</a>]]
- .. translate("."))
-m.reset = false
+ .. translatef("For further information "
+ .. "<a href=\"%s\" target=\"_blank\">"
+ .. "see online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"))
+
+function m.on_after_commit(self)
+ function e3.validate(self, value)
+ if value == "0" then
+ luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
+ else
+ luci.sys.call("/etc/init.d/adblock start >/dev/null 2>&1")
+ end
+ end
+ luci.http.redirect(luci.dispatcher.build_url("admin", "services", "adblock"))
+end