X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/16e7b37c7914d753890c1a05a9335f3b43751eb8..refs/tags/wordpress-4.7.1:/wp-admin/js/updates.js diff --git a/wp-admin/js/updates.js b/wp-admin/js/updates.js index 400842eb..7dd58aae 100644 --- a/wp-admin/js/updates.js +++ b/wp-admin/js/updates.js @@ -1516,11 +1516,11 @@ * @param {string} message Error message. */ wp.updates.showErrorInCredentialsForm = function( message ) { - var $modal = $( '#request-filesystem-credentials-form' ); + var $filesystemForm = $( '#request-filesystem-credentials-form' ); // Remove any existing error. - $modal.find( '.notice' ).remove(); - $modal.find( '#request-filesystem-credentials-title' ).after( '

' + message + '

' ); + $filesystemForm.find( '.notice' ).remove(); + $filesystemForm.find( '#request-filesystem-credentials-title' ).after( '

' + message + '

' ); }; /** @@ -1670,6 +1670,7 @@ $( function() { var $pluginFilter = $( '#plugin-filter' ), $bulkActionForm = $( '#bulk-action-form' ), + $filesystemForm = $( '#request-filesystem-credentials-form' ), $filesystemModal = $( '#request-filesystem-credentials-dialog' ), $pluginSearch = $( '.plugins-php .wp-filter-search' ), $pluginInstallSearch = $( '.plugin-install-php .wp-filter-search' ); @@ -1725,7 +1726,7 @@ * * @since 4.2.0 */ - $filesystemModal.on( 'change', 'input[name="connection_type"]', function() { + $filesystemForm.on( 'change', 'input[name="connection_type"]', function() { $( '#ssh-keys' ).toggleClass( 'hidden', ( 'ssh' !== $( this ).val() ) ); } ).change();