mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
0cd74a6d6e
commit
fc1350ebe5
@ -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;
|
||||
};
|
||||
|
2
wp-admin/js/common.min.js
vendored
2
wp-admin/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user