Administration: Ensure validateForm also validates other input fields.

With this change, textareas and select inputs will be checked as well.

Props shadyvb.
Fixes #37540.

Built from https://develop.svn.wordpress.org/trunk@40634


git-svn-id: http://core.svn.wordpress.org/trunk@40495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-05-11 19:18:42 +00:00
parent 0cd74a6d6e
commit fc1350ebe5
3 changed files with 4 additions and 4 deletions

View File

@ -79,9 +79,9 @@ $document.ready(function(){columns.init();});
validateForm = function( form ) {
return !$( form )
.find( '.form-required' )
.filter( function() { return $( 'input:visible', this ).val() === ''; } )
.filter( function() { return $( ':input:visible', this ).val() === ''; } )
.addClass( 'form-invalid' )
.find( 'input:visible' )
.find( ':input:visible' )
.change( function() { $( this ).closest( '.form-invalid' ).removeClass( 'form-invalid' ); } )
.length;
};

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40633';
$wp_version = '4.8-alpha-40634';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.