+ // Hide SSH fields when not selected
+ $( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() {
+ $( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) );
+ }).change();
+