WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/07/2012 11:54:03 PM (7 years ago)
Author:
nacin
Message:

Forms with the class .wp-upload-form will now have their submit button disabled until a file is selected. props kovshenin, helenyhou, lessbloat, SergeyBiryukov, tommcfarlin. fixes #20855.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin-install.php

    r22026 r22459  
    143143function install_plugins_upload( $page = 1 ) {
    144144?>
    145     <h4><?php _e('Install a plugin in .zip format') ?></h4>
    146     <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.') ?></p>
    147     <form method="post" enctype="multipart/form-data" action="<?php echo self_admin_url('update.php?action=upload-plugin') ?>">
    148         <?php wp_nonce_field( 'plugin-upload') ?>
     145    <h4><?php _e('Install a plugin in .zip format'); ?></h4>
     146    <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p>
     147    <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>">
     148        <?php wp_nonce_field( 'plugin-upload'); ?>
    149149        <label class="screen-reader-text" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
    150150        <input type="file" id="pluginzip" name="pluginzip" />
    151         <input type="submit" class="button" value="<?php esc_attr_e('Install Now') ?>" />
     151        <?php submit_button( __( 'Install Now' ), 'button', 'install-plugin-submit', false ); ?>
    152152    </form>
    153153<?php
Note: See TracChangeset for help on using the changeset viewer.