luci-app-firewall: remove references to cbi_bind()
authorJo-Philipp Wich <jo@mein.io>
Tue, 13 Nov 2018 19:01:32 +0000 (20:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Nov 2018 19:46:04 +0000 (20:46 +0100)
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>
applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
applications/luci-app-firewall/luasrc/view/firewall/cbi_addrule.htm

index f48599b505fb8295ba644d8a840771fce3338ff2..1bb86821ecb4dae7c19a527c4f3b6884bd5a1826 100644 (file)
@@ -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');
index 82168712ae54a0bf3816f175c2db3be37bffe865..c02fc20f9e8be2eb11499f2a021ebd71131585f6 100644 (file)
@@ -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');
                                        }
                                }
                        });
-
-
-               cbi_validate_field('cbi.cts.<%=self.config%>.<%=self.sectiontype%>.<%=section%>', true, 'uciname');
        //]]></script>
 <% end %>