Updates: Properly define `$filesystemForm` to handle error in modals.

Ammends [39657].
See #39057.


git-svn-id: https://develop.svn.wordpress.org/trunk@39689 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2017-01-05 07:23:10 +00:00
parent de72bafedc
commit 7cfb768da3
1 changed files with 2 additions and 0 deletions

View File

@ -1516,6 +1516,8 @@
* @param {string} message Error message. * @param {string} message Error message.
*/ */
wp.updates.showErrorInCredentialsForm = function( message ) { wp.updates.showErrorInCredentialsForm = function( message ) {
var $filesystemForm = $( '#request-filesystem-credentials-form' );
// Remove any existing error. // Remove any existing error.
$filesystemForm.find( '.notice' ).remove(); $filesystemForm.find( '.notice' ).remove();
$filesystemForm.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' ); $filesystemForm.find( '#request-filesystem-credentials-title' ).after( '<div class="notice notice-alt notice-error"><p>' + message + '</p></div>' );