luci-base: cbi: refactor event handling js
[project/luci.git] / modules / luci-base / luasrc / view / cbi / fvalue.htm
index a1e0808..5eddcf2 100644 (file)
@@ -2,7 +2,7 @@
        <input type="hidden" value="1"<%=
                attr("name", "cbi.cbe." .. self.config .. "." .. section .. "." .. self.option)
        %> />
-       <input class="cbi-input-checkbox" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%=
+       <input class="cbi-input-checkbox" data-update="click change" type="checkbox"<%=
                attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
                ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
        %> />