Make WordPress Core

Changeset 22663


Ignore:
Timestamp:
11/19/2012 06:07:04 AM (14 years ago)
Author:
nacin
Message:

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].

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/common.js

    r22636 r22663  
    403403                button = form.find('input[type="submit"]');
    404404                input = form.find('input[type="file"]');
     405
    405406                function toggleUploadButton() {
    406                         button.prop('disabled', '' === input.val());
     407                        button.prop('disabled', '' === input.map( function() {
     408                                return $(this).val();
     409                        }).get().join(''));
    407410                }
    408411                toggleUploadButton();
  • trunk/wp-admin/media-upload.php

    r21048 r22663  
    8888        require_once('./admin-header.php');
    8989
    90         $form_class = 'media-upload-form type-form validate';
     90        $form_class = 'media-upload-form wp-upload-form type-form validate';
    9191
    9292        if ( get_user_setting('uploader') )
Note: See TracChangeset for help on using the changeset viewer.