Ticket #17115: disable-submit-inputs-meta-boxes.diff
File disable-submit-inputs-meta-boxes.diff, 3.4 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/meta-boxes.php
22 22 23 23 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?> 24 24 <div style="display:none;"> 25 <?php submit_button( __( 'Save' ), 'button', 'save' ); ?>25 <?php submit_button( __( 'Save' ), 'button', 'save', true, 'disabled' ); ?> 26 26 </div> 27 27 28 28 <div id="minor-publishing-actions"> 29 29 <div id="save-action"> 30 30 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 31 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" />31 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" disabled /> 32 32 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" />33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" disabled /> 34 34 <?php } ?> 35 35 <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" /> 36 36 </div> … … 210 210 if ( $can_publish ) : 211 211 if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> 212 212 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" /> 213 <?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>213 <?php submit_button( __( 'Schedule' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p', 'disabled' => 'disabled' ) ); ?> 214 214 <?php else : ?> 215 215 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" /> 216 <?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>216 <?php submit_button( __( 'Publish' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p', 'disabled' => 'disabled' ) ); ?> 217 217 <?php endif; 218 218 else : ?> 219 219 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" /> 220 <?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p' ) ); ?>220 <?php submit_button( __( 'Submit for Review' ), 'primary', 'publish', false, array( 'tabindex' => '5', 'accesskey' => 'p', 'disabled' => 'disabled' ) ); ?> 221 221 <?php 222 222 endif; 223 223 } else { ?> 224 224 <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update') ?>" /> 225 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Update') ?>" />225 <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Update') ?>" disabled /> 226 226 <?php 227 227 } ?> 228 228 </div>