Ticket #31354: 31354.2.patch
File 31354.2.patch, 4.8 KB (added by , 10 years ago) |
---|
-
network/settings.php
# Based on the Latest check out form the WP Trunk # https://core.svn.wordpress.org/trunk/ @ 31465 # Above lines and this line are ignored by the patching process.
39 39 $( '#submit', this ).after( '<span class="spinner language-install-spinner" />' ); 40 40 } 41 41 }); 42 jQuery('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'}); 43 jQuery('.option-label-chk input[type="checkbox"]').click(function(){ 44 if(jQuery(this).is(':checked')){ 45 jQuery(this).parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled'); 46 }else{ 47 jQuery(this).parents('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'}); 48 } 42 49 }); 50 jQuery('.option-label-chk input[type="checkbox"]:checked').parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled'); 51 }); 43 52 </script> 44 53 <?php 45 54 } … … 293 302 <tr> 294 303 <th scope="row"><?php _e( 'Site upload space' ) ?></th> 295 304 <td> 296 <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br /> 305 <div class="option-label-chk"> 306 <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label></div> 297 307 </td> 298 308 </tr> 299 309 -
options-discussion.php
21 21 */ 22 22 function options_discussion_add_js() { 23 23 ?> 24 <script>24 <script type="text/javascript"> 25 25 (function($){ 26 26 var parent = $( '#show_avatars' ), 27 27 children = $( '.avatar-settings' ); … … 29 29 children.toggleClass( 'hide-if-js', ! this.checked ); 30 30 }); 31 31 })(jQuery); 32 jQuery(document).ready(function(){ 33 jQuery('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'}); 34 jQuery('.option-label-chk input[type="checkbox"]').click(function(){ 35 if(jQuery(this).is(':checked')){ 36 jQuery(this).parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled'); 37 }else{ 38 jQuery(this).parents('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'}); 39 } 40 }); 41 jQuery('.option-label-chk input[type="checkbox"]:checked').parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled'); 42 }); 32 43 </script> 33 44 <?php 34 45 } … … 86 97 <?php if ( !get_option( 'users_can_register' ) && is_multisite() ) echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' ); ?> 87 98 </label> 88 99 <br /> 89 100 <div class="option-label-chk"> 90 101 <label for="close_comments_for_old_posts"> 91 102 <input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> /> 92 103 <?php printf( __('Automatically close comments on articles older than %s days'), '</label><label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />'); ?> 93 104 </label> 94 <br /> 105 </div> 106 <div class="option-label-chk"> 95 107 <label for="thread_comments"> 96 108 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> /> 97 109 <?php … … 115 127 printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth ); 116 128 117 129 ?></label> 118 <br /> 130 </div> 131 <div class="option-label-chk"> 119 132 <label for="page_comments"> 120 133 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> /> 121 134 <?php … … 141 154 printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order ); 142 155 143 156 ?></label> 157 </div> 144 158 </fieldset></td> 145 159 </tr> 146 160 <tr>