summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-11-13 20:01:32 +0100
committerJo-Philipp Wich <jo@mein.io>2018-11-14 20:46:04 +0100
commit520a6add526fe6ed0a0da4ce42070e2456e71fa2 (patch)
tree22b03652afa1dda45d2e9e988f235bc2ade8cc6e
parent1dcdbb54ac872bc51aa1b2a8c68c795244a345dd (diff)
luci-app-firewall: remove references to cbi_bind()
Use the standard addEventListener() instead. Also remove an old cbi_validate_field() call referencing a not existing field. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm2
-rw-r--r--applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm5
2 files changed, 2 insertions, 5 deletions
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
index f48599b505..1bb86821ec 100644
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
+++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
@@ -71,7 +71,7 @@
</div>
<script type="text/javascript">//<![CDATA[
- cbi_bind(document.getElementById('_newfwd.extport'), 'blur',
+ document.getElementById('_newfwd.extport').addEventListener('blur',
function() {
var n = document.getElementById('_newfwd.name');
var p = document.getElementById('_newfwd.proto');
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
index 82168712ae..c02fc20f9e 100644
--- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
+++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm
@@ -72,7 +72,7 @@
<% if #zones > 0 then %>
<script type="text/javascript">//<![CDATA[
cbi_validate_field('_newopen.extport', true, 'list(neg(portrange))');
- cbi_bind(document.getElementById('_newopen.extport'), 'blur',
+ document.getElementById('_newopen.extport').addEventListener('blur',
function() {
var n = document.getElementById('_newopen.name');
var p = document.getElementById('_newopen.proto');
@@ -100,8 +100,5 @@
}
}
});
-
-
- cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');
//]]></script>
<% end %>