From 16f887ddae3cc50ef833cd428bd80c8fcfbbe0d1 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 30 Dec 2016 07:45:05 +0000 Subject: [PATCH] Updates: Show the Authentication key settings after selecting the SSH transport in both the modal, and also on the plugin/theme updates screen. Props afercia. Merges [39657] to the 4.7 branch. Fixes #39057. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39658 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index 400842ebd4..66040faa6a 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -1516,11 +1516,9 @@ * @param {string} message Error message. */ wp.updates.showErrorInCredentialsForm = function( message ) { - var $modal = $( '#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 +1668,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 +1724,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();