]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Firewall: added JS to automatically select radiobuttons in fwhosts
authorAlexander Marx <amarx@ipfire.org>
Fri, 20 Dec 2013 08:40:24 +0000 (09:40 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Dec 2013 11:10:03 +0000 (12:10 +0100)
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