diff -u b/core/includes/install.core.inc b/core/includes/install.core.inc
--- b/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1845,18 +1845,18 @@
);
$form['update_notifications']['update_status_module'] = array(
'#type' => 'checkboxes',
- '#default_value' => array('check', 'notify'),
'#options' => array(
- 'check' => st('Check for updates automatically.'),
- 'notify' => st('Receive e-mail notifications.'),
+ 1 => st('Check for updates automatically'),
+ 2 => st('Receive e-mail notifications'),
),
+ '#default_value' => array(1, 2),
'#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to Drupal.org.', array('@drupal' => 'http://drupal.org')),
'#weight' => 15,
);
- $form['update_notifications']['update_status_module']['notify'] = array(
+ $form['update_notifications']['update_status_module'][2] = array(
'#states' => array(
'visible' => array(
- 'input[name="update_status_module[check]"]' => array('checked' => TRUE),
+ 'input[name="update_status_module[1]"]' => array('checked' => TRUE),
),
),
);
diff -u b/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
--- b/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -2894,16 +2894,16 @@
}
/**
- * Return the date for a given format string via Ajax.
+ * Ajax callback; Returns the date for a given format string.
*/
-function system_date_time_lookup($form, $form_state) {
+function system_date_time_lookup($form, &$form_state) {
$format = '';
if (!empty($form_state['values']['date_format'])) {
$format = t('Displayed as %date_format', array('%date_format' => format_date(REQUEST_TIME, 'custom', $form_state['values']['date_format'])));
}
- // We are returning command and not directly string because if we return
- // string ajax api will prepend additional empty div element which will mess
- // our layout.
+ // Return a command instead of a string, since the Ajax framework
+ // automatically prepends an additional empty DIV element for a string, which
+ // breaks the layout.
$commands[] = ajax_command_replace('#edit-date-format-suffix', '' . $format . '');
return array('#type' => 'ajax', '#commands' => $commands);
}
diff -u b/core/modules/system/system.js b/core/modules/system/system.js
--- b/core/modules/system/system.js
+++ b/core/modules/system/system.js
@@ -2,7 +2,7 @@
"use strict";
-// Cache ids in an array for ease of use.
+// Cache IDs in an array for ease of use.
var ids = [];
/**
@@ -39,7 +39,7 @@
Drupal.behaviors.copyFieldValue = {
attach: function (context, settings) {
// List of fields IDs on which to bind the event listener.
- // Create an array of ids to use with jQuery.
+ // Create an array of IDs to use with jQuery.
for (var sourceId in settings.copyFieldValue) {
if (settings.copyFieldValue.hasOwnProperty(sourceId)) {
ids.push(sourceId);