]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/updates.js
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / js / updates.js
index 400842ebd462426846e0063dd991c6a309f36d66..7dd58aaee7c49c8f9bec40394589696ae62c04bc 100644 (file)
         * @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( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );
+               $filesystemForm.find( '.notice' ).remove();
+               $filesystemForm.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );
        };
 
        /**
        $( 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' );
                 *
                 * @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();