Administration: Ensure validateForm
also validates other input fields.
With this change, textareas and select inputs will be checked as well. Props shadyvb. Fixes #37540. git-svn-id: https://develop.svn.wordpress.org/trunk@40634 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2dbc6ea67b
commit
d8ca95415e
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user