luci-app-firewall: remove hinting
[project/luci.git] / applications / luci-app-firewall / luasrc / view / firewall / cbi_addrule.htm
index c02fc20f9e8be2eb11499f2a021ebd71131585f6..e0092a7a56e4f8e36682f6ae8a0e2f07e4d0d1a8 100644 (file)
                        function() {
                                var n = document.getElementById('_newopen.name');
                                var p = document.getElementById('_newopen.proto');
-                               var hints = {
-                               /*  port    name     0=both, 1=tcp, 2=udp, 3=other */
-                                       22:   [ 'SSH',   1 ],
-                                       53:   [ 'DNS',   0 ],
-                                       80:   [ 'HTTP',  1 ],
-                                       443:  [ 'HTTPS', 1 ],
-                               };
 
                                if (!this.className.match(/invalid/))
                                {
-                                       var hint = hints[this.value || 0];
-                                       if (hint)
-                                       {
-                                               p.selectedIndex = hint[1];
-
-                                               if (!n.value)
-                                                       n.value = hint[0];
-                                       }
-                                       else if (!n.value && this.value)
+                                       if (!n.value && this.value)
                                        {
                                                n.value = 'Open' + this.value;
                                        }