Re-enable a .wp-upload-form submit button whenever any file input in that form has a file selected, to minimize the potential for issues. props kovshenin. fixes #20855. see [22459].
git-svn-id: http://core.svn.wordpress.org/trunk@22663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1af6c38db3
commit
e3069d9d62
|
@ -402,8 +402,11 @@ $(document).ready( function() {
|
|||
return;
|
||||
button = form.find('input[type="submit"]');
|
||||
input = form.find('input[type="file"]');
|
||||
|
||||
function toggleUploadButton() {
|
||||
button.prop('disabled', '' === input.val());
|
||||
button.prop('disabled', '' === input.map( function() {
|
||||
return $(this).val();
|
||||
}).get().join(''));
|
||||
}
|
||||
toggleUploadButton();
|
||||
input.on('change', toggleUploadButton);
|
||||
|
|
|
@ -87,7 +87,7 @@ if ( isset($_GET['inline']) ) {
|
|||
|
||||
require_once('./admin-header.php');
|
||||
|
||||
$form_class = 'media-upload-form type-form validate';
|
||||
$form_class = 'media-upload-form wp-upload-form type-form validate';
|
||||
|
||||
if ( get_user_setting('uploader') )
|
||||
$form_class .= ' html-uploader';
|
||||
|
|
Loading…
Reference in New Issue