WordPress.org

Make WordPress Core

Ticket #31354: 31354.3.patch

File 31354.3.patch, 4.8 KB (added by DrewAPicture, 7 years ago)

regenerated from root

  • src/wp-admin/network/settings.php

     
    3939                        $( '#submit', this ).after( '<span class="spinner language-install-spinner" />' );
    4040                }
    4141        });
     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            }
    4249});
     50        jQuery('.option-label-chk input[type="checkbox"]:checked').parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled');
     51});
    4352</script>
    4453<?php
    4554}
     
    293302                        <tr>
    294303                                <th scope="row"><?php _e( 'Site upload space' ) ?></th>
    295304                                <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>
    297307                                </td>
    298308                        </tr>
    299309
  • src/wp-admin/options-discussion.php

     
    2121 */
    2222function options_discussion_add_js() {
    2323?>
    24         <script>
     24<script type="text/javascript">
    2525        (function($){
    2626                var parent = $( '#show_avatars' ),
    2727                        children = $( '.avatar-settings' );
     
    2929                        children.toggleClass( 'hide-if-js', ! this.checked );
    3030                });
    3131        })(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    });
    3243        </script>
    3344<?php
    3445}
     
    8697<?php if ( !get_option( 'users_can_register' ) && is_multisite() ) echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' ); ?>
    8798</label>
    8899<br />
    89 
     100<div class="option-label-chk">
    90101<label for="close_comments_for_old_posts">
    91102<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')); ?> />
    92103<?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" />'); ?>
    93104</label>
    94 <br />
     105</div>
     106<div class="option-label-chk">
    95107<label for="thread_comments">
    96108<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
    97109<?php
     
    115127printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
    116128
    117129?></label>
    118 <br />
     130</div>
     131<div class="option-label-chk">
    119132<label for="page_comments">
    120133<input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> />
    121134<?php
     
    141154printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
    142155
    143156?></label>
     157</div>
    144158</fieldset></td>
    145159</tr>
    146160<tr>