Changeset 3345 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
- Timestamp:
- 06/14/2016 06:58:07 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
r3335 r3345 42 42 <?php endif; ?> 43 43 44 <form id="upload_form" enctype="multipart/form-data" method="POST" action="">44 <form id="upload_form" class="plugin-upload-form" enctype="multipart/form-data" method="POST" action=""> 45 45 <?php wp_nonce_field( 'wporg-plugins-upload' ); ?> 46 46 <input type="hidden" name="action" value="upload"/> 47 47 <fieldset> 48 <legend><?php _e( ' Plugin Categories (up to 3)', 'wporg-plugins' ); ?></legend>49 <ul class="category-checklist form-no-clear">48 <legend><?php _e( 'Select categories (up to 3)', 'wporg-plugins' ); ?></legend> 49 <ul class="category-checklist"> 50 50 <?php wp_terms_checklist( 0, array( 'taxonomy' => 'plugin_category' ) ); ?> 51 51 </ul> 52 52 </fieldset> 53 <input type="file" id="zip_file" name="zip_file" size="25"/> 54 <input id="upload_button" class="button" type="submit" value="<?php esc_attr_e( 'Upload', 'wporg-plugins' ); ?>"/> 53 54 <input type="file" id="zip_file" class="plugin-file" name="zip_file" size="25" accept=".zip"/> 55 <label class="button button-secondary" for="zip_file"><?php _e( 'Select File', 'wporg-plugins' ); ?></label> 56 57 <input id="upload_button" class="button button-primary" type="submit" value="<?php esc_attr_e( 'Upload', 'wporg-plugins' ); ?>"/> 55 58 56 59 <p> … … 58 61 </p> 59 62 </form> 63 <script> 64 ( function ( $ ) { 65 var $label = $( 'label.button' ), 66 labelText = $label.text(); 67 68 $( '#zip_file' ) 69 .on( 'change', function( event ) { 70 var fileName = event.target.value.split( '\\' ).pop(); 71 72 fileName ? $label.text( fileName ) : $label.text( labelText ); 73 } ) 74 .on( 'focus', function() { $label.addClass( 'focus' ); } ) 75 .on( 'blur', function() { $label.removeClass( 'focus' ); } ); 76 } ( window.jQuery ) ); 77 </script> 60 78 61 79 <?php else : ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)