]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/fwhosts.cgi
Firewall: added JS to automatically select radiobuttons in fwhosts
[people/teissler/ipfire-2.x.git] / html / cgi-bin / fwhosts.cgi
index c25110ed084ef3d5747f15881b150108528719a0..330b0f72d4f410e36385410e05cbf2fe28454774 100755 (executable)
@@ -111,6 +111,12 @@ print<<END;
                var protocol = \$("#protocol").val();
                \$("#protocol").change(update_protocol);
                update_protocol();
+               // Automatically select radio buttons when corresponding
+               // dropdown menu changes.
+               \$("select").change(function() {
+                       var id = \$(this).attr("name");
+                       \$('#' + id).prop("checked", true);
+               });
        });
 </script>
 END