# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Applications/MAMP/htdocs/corewp/wp_411/trunk/wp-admin
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: network/settings.php
--- network/settings.php Base (BASE)
+++ network/settings.php Locally Modified (Based On LOCAL)
@@ -39,7 +39,16 @@
 			$( '#submit', this ).after( '<span class="spinner language-install-spinner" />' );
 		}
 	});
+        jQuery('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'});
+        jQuery('.option-label-chk input[type="checkbox"]').click(function(){
+            if(jQuery(this).is(':checked')){
+                jQuery(this).parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled');
+            }else{
+                jQuery(this).parents('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'});
+            }
 });
+        jQuery('.option-label-chk input[type="checkbox"]:checked').parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled');
+});
 </script>
 <?php
 }
@@ -293,7 +302,8 @@
 			<tr>
 				<th scope="row"><?php _e( 'Site upload space' ) ?></th>
 				<td>
-				<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 />
+                                <div class="option-label-chk">    
+				<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>
 				</td>
 			</tr>
 
Index: options-discussion.php
--- options-discussion.php Base (BASE)
+++ options-discussion.php Locally Modified (Based On LOCAL)
@@ -14,25 +14,26 @@
 $title = __('Discussion Settings');
 $parent_file = 'options-general.php';
 
-/**
- * Display JavaScript on the page.
- *
- * @since 4.2.0
- */
 function options_discussion_add_js() {
 ?>
-	<script>
-	(function($){
-		var parent = $( '#show_avatars' ),
-			children = $( '.avatar-settings' );
-		parent.change(function(){
-			children.toggleClass( 'hide-if-js', ! this.checked );
+<script type="text/javascript">
+//<![CDATA[
+    jQuery(document).ready(function(){
+        jQuery('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'});
+        jQuery('.option-label-chk input[type="checkbox"]').click(function(){
+            if(jQuery(this).is(':checked')){
+                jQuery(this).parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled');
+            }else{
+                jQuery(this).parents('.option-label-chk').find('input[type="number"],select').attr({disabled:'disabled'});
+            }
 		});
-	})(jQuery);
+        jQuery('.option-label-chk input[type="checkbox"]:checked').parents('.option-label-chk').find('input[type="number"],select').removeAttr('disabled');
+    });
+//]]>
 	</script>
 <?php
 }
-add_action( 'admin_print_footer_scripts', 'options_discussion_add_js' );
+add_action('admin_head', 'options_discussion_add_js');
 
 get_current_screen()->add_help_tab( array(
 	'id'      => 'overview',
@@ -86,12 +87,13 @@
 <?php if ( !get_option( 'users_can_register' ) && is_multisite() ) echo ' ' . __( '(Signup has been disabled. Only members of this site can comment.)' ); ?>
 </label>
 <br />
-
+<div class="option-label-chk">
 <label for="close_comments_for_old_posts">
 <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')); ?> />
 <?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" />'); ?>
 </label>
-<br />
+</div>
+<div class="option-label-chk">
 <label for="thread_comments">
 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
 <?php
@@ -115,7 +117,8 @@
 printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
 
 ?></label>
-<br />
+</div>
+<div class="option-label-chk">
 <label for="page_comments">
 <input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> />
 <?php
@@ -141,6 +144,7 @@
 printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
 
 ?></label>
+</div>
 </fieldset></td>
 </tr>
 <tr>
@@ -192,23 +196,19 @@
 
 <p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.'); ?></p>
 
-<?php
-// the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that?
+<?php // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that? ?>
 
-$show_avatars = get_option( 'show_avatars' );
-?>
-
 <table class="form-table">
 <tr>
 <th scope="row"><?php _e('Avatar Display'); ?></th>
 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Avatar Display'); ?></span></legend>
 	<label for="show_avatars">
-		<input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( $show_avatars, 1 ); ?> />
+		<input type="checkbox" id="show_avatars" name="show_avatars" value="1" <?php checked( get_option('show_avatars'), 1 ); ?> />
 		<?php _e( 'Show Avatars' ); ?>
 	</label>
 </fieldset></td>
 </tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
+<tr>
 <th scope="row"><?php _e('Maximum Rating'); ?></th>
 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Maximum Rating'); ?></span></legend>
 
@@ -231,7 +231,7 @@
 
 </fieldset></td>
 </tr>
-<tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">
+<tr>
 <th scope="row"><?php _e('Default Avatar'); ?></th>
 <td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e('Default Avatar'); ?></span></legend>
 
@@ -263,10 +263,6 @@
 	$default = 'mystery';
 $size = 32;
 $avatar_list = '';
-
-// Force avatars on to display these choices
-add_filter( 'pre_option_show_avatars', '__return_true', 100 );
-
 foreach ( $avatar_defaults as $default_key => $default_name ) {
 	$selected = ($default == $default_key) ? 'checked="checked" ' : '';
 	$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
@@ -277,9 +273,6 @@
 	$avatar_list .= ' ' . $default_name . '</label>';
 	$avatar_list .= '<br />';
 }
-
-remove_filter( 'pre_option_show_avatars', '__return_true', 100 );
-
 /**
  * Filter the HTML output of the default avatar list.
  *
