diff --git a/core/includes/form.inc b/core/includes/form.inc
index 23f66c2..e790f9b 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -2858,8 +2858,8 @@ function form_get_options($element, $key) {
* @param $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
- * Properties used: #attributes, #children, #collapsed, #description, #id,
- * #title, #value.
+ * Properties used: #attributes, #children, #description, #id, #title,
+ * #value.
*
* @ingroup themeable
*/
@@ -2904,8 +2904,8 @@ function theme_fieldset($variables) {
* @param $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
- * Properties used: #attributes, #children, #collapsed, #description, #id,
- * #title, #value.
+ * Properties used: #attributes, #children, #description, #id, #title,
+ * #value.
*
* @ingroup themeable
*/
@@ -2922,7 +2922,7 @@ function theme_details($variables) {
if (!empty($element['#attributes']['id'])) {
$summary_attributes['aria-controls'] = $element['#attributes']['id'];
}
- $summary_attributes['aria-expanded'] = empty($element['#attributes']['open']) ? FALSE : TRUE;
+ $summary_attributes['aria-expanded'] = !empty($element['#attributes']['open']);
$summary_attributes['aria-pressed'] = $summary_attributes['aria-expanded'];
$output .= '' . $element['#title'] . '';
}
@@ -3929,8 +3929,8 @@ function form_pre_render_details($element) {
// Collapsible details.
$element['#attached']['library'][] = array('system', 'drupal.collapse');
- if (empty($element['#collapsed'])) {
- $element['#attributes']['open'] = 'open';
+ if (!empty($element['#open'])) {
+ $element['#attributes']['open'] = 'open';
}
return $element;
diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php
index b051c75..f55c3b2 100644
--- a/core/lib/Drupal/Core/Database/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Install/Tasks.php
@@ -233,7 +233,6 @@ public function getFormOptions($database) {
$form['advanced_options'] = array(
'#type' => 'details',
'#title' => st('Advanced options'),
- '#collapsed' => TRUE,
'#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."),
'#weight' => 10,
);
diff --git a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
index 823e17e..95f440c 100644
--- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
+++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php
@@ -408,7 +408,6 @@ public function getSettingsForm() {
$form['advanced'] = array(
'#type' => 'details',
'#title' => t('Advanced settings'),
- '#collapsed' => TRUE,
);
$form['advanced']['hostname'] = array(
'#type' => 'textfield',
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php
index 9a5cbde..2e74add 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php
@@ -131,7 +131,7 @@ public function buildForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Basic configuration'),
'#description' => t('For most aggregation tasks, the default settings are fine.'),
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
$form['basic_conf'] += $basic_conf;
}
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
index 6b160ff..e4e02ff 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
@@ -45,7 +45,7 @@ public function settingsForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Default processor settings'),
'#description' => $info['description'],
- '#collapsed' => !in_array($info['id'], $processors),
+ '#open' => in_array($info['id'], $processors),
);
}
diff --git a/core/modules/aggregator/tests/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php b/core/modules/aggregator/tests/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php
index e218b8a..1d5f3d1 100644
--- a/core/modules/aggregator/tests/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php
+++ b/core/modules/aggregator/tests/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php
@@ -38,7 +38,7 @@ public function settingsForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('Test processor settings'),
'#description' => $info['description'],
- '#collapsed' => !in_array($info['id'], $processors),
+ '#open' => in_array($info['id'], $processors),
);
// Add some dummy settings to verify settingsForm is called.
$form['processors'][$info['id']]['dummy_length'] = array(
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
index 1a09dbf..1a2163d 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
@@ -93,7 +93,7 @@ public function form(array $form, array &$form_state) {
'#title' => t('Revision information'),
'#collapsible' => TRUE,
// Collapsed by default when "Create new revision" is unchecked.
- '#collapsed' => !$block->isNewRevision(),
+ '#open' => $block->isNewRevision(),
'#group' => 'advanced',
'#attributes' => array(
'class' => array('custom-block-form-revision-information'),
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php
index 6e5de33..f40d57a 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.php
@@ -56,8 +56,6 @@ public function form(array $form, array &$form_state) {
$form['language'] = array(
'#type' => 'details',
'#title' => t('Language settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
'#group' => 'additional_settings',
);
diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php
index ef499c0..9a156aa 100644
--- a/core/modules/block/lib/Drupal/block/BlockFormController.php
+++ b/core/modules/block/lib/Drupal/block/BlockFormController.php
@@ -57,7 +57,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['path'] = array(
'#type' => 'details',
'#title' => t('Pages'),
- '#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 0,
);
@@ -120,7 +119,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['language'] = array(
'#type' => 'details',
'#title' => t('Languages'),
- '#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 5,
);
@@ -153,7 +151,6 @@ public function form(array $form, array &$form_state) {
$form['visibility']['role'] = array(
'#type' => 'details',
'#title' => t('Roles'),
- '#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 10,
);
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 3ac47f4..801c155 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -420,7 +420,6 @@ function _book_add_form_elements(&$form, &$form_state, EntityInterface $node) {
'#type' => 'details',
'#title' => t('Book outline'),
'#weight' => 10,
- '#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('book-outline-form'),
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 0c2cd55..3c880a5 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -990,7 +990,6 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
$form['comment'] = array(
'#type' => 'details',
'#title' => t('Comment settings'),
- '#collapsed' => TRUE,
'#group' => 'additional_settings',
'#attributes' => array(
'class' => array('comment-node-type-settings-form'),
@@ -1096,7 +1095,6 @@ function comment_form_node_form_alter(&$form, $form_state) {
'#type' => 'details',
'#access' => user_access('administer comments'),
'#title' => t('Comment settings'),
- '#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('comment-node-settings-form'),
diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
index 179410c..f017528 100644
--- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php
+++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php
@@ -53,7 +53,6 @@ public function form(array $form, array &$form_state) {
$form['author'] += array(
'#type' => 'details',
'#title' => t('Administration'),
- '#collapsed' => TRUE,
);
}
diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc
index cf744b0..ae7dab5 100644
--- a/core/modules/dblog/dblog.admin.inc
+++ b/core/modules/dblog/dblog.admin.inc
@@ -230,7 +230,7 @@ function dblog_filter_form($form) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter log messages'),
- '#collapsed' => empty($_SESSION['dblog_overview_filter']),
+ '#open' => !empty($_SESSION['dblog_overview_filter']),
);
foreach ($filters as $key => $filter) {
$form['filters']['status'][$key] = array(
@@ -307,7 +307,6 @@ function dblog_clear_log_form($form) {
'#type' => 'details',
'#title' => t('Clear log messages'),
'#description' => t('This will permanently remove the log messages from the database.'),
- '#collapsed' => TRUE,
);
$form['dblog_clear']['clear'] = array(
'#type' => 'submit',
diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
index 7e7de46..77f69f2 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
@@ -452,7 +452,6 @@ function multiple_options_form(&$form, &$form_state) {
$form['multiple_field_settings'] = array(
'#type' => 'details',
'#title' => t('Multiple field settings'),
- '#collapsed' => TRUE,
'#weight' => 5,
);
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
index e6caf4e..a1e9135 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
@@ -352,7 +352,6 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
$form['modes'] = array(
'#type' => 'details',
'#title' => t('Custom display settings'),
- '#collapsed' => TRUE,
);
// Collect options and default values for the 'Custom display settings'
// checkboxes.
diff --git a/core/modules/language/language.admin.inc b/core/modules/language/language.admin.inc
index 59f1efa..69da259 100644
--- a/core/modules/language/language.admin.inc
+++ b/core/modules/language/language.admin.inc
@@ -617,7 +617,6 @@ function language_negotiation_configure_browser_form($form, &$form_state) {
$form['new_mapping'] = array(
'#type' => 'details',
'#title' => t('Add a new mapping'),
- '#collapsed' => TRUE,
'#tree' => TRUE,
);
$form['new_mapping']['browser_langcode'] = array(
diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc
index 5173132..f89ce34 100644
--- a/core/modules/locale/locale.bulk.inc
+++ b/core/modules/locale/locale.bulk.inc
@@ -177,7 +177,6 @@ function locale_translate_export_form($form, &$form_state) {
$form['content_options'] = array(
'#type' => 'details',
'#title' => t('Export options'),
- '#collapsed' => TRUE,
'#tree' => TRUE,
'#states' => array(
'invisible' => array(
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index a109f5f..1057588 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -169,7 +169,7 @@ function locale_translate_filter_form($form, &$form_state) {
$form['filters'] = array(
'#type' => 'details',
'#title' => t('Filter translatable strings'),
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
foreach ($filters as $key => $filter) {
// Special case for 'string' filter.
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 93c2ed8..7da68b2 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -553,7 +553,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
'#type' => 'details',
'#title' => t('Menu settings'),
'#access' => user_access('administer menu'),
- '#collapsed' => !$link['link_title'],
+ '#open' => !empty($link['link_title']),
'#group' => 'advanced',
'#attached' => array(
'library' => array(array('menu', 'drupal.menu')),
@@ -653,7 +653,6 @@ function menu_form_node_type_form_alter(&$form, $form_state) {
$form['menu'] = array(
'#type' => 'details',
'#title' => t('Menu settings'),
- '#collapsed' => TRUE,
'#attached' => array(
'library' => array(array('menu', 'drupal.menu.admin')),
),
diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc
index f8b144a..68838b2 100644
--- a/core/modules/node/content_types.inc
+++ b/core/modules/node/content_types.inc
@@ -192,7 +192,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['workflow'] = array(
'#type' => 'details',
'#title' => t('Publishing options'),
- '#collapsed' => TRUE,
'#group' => 'additional_settings',
);
$form['workflow']['node_options'] = array('#type' => 'checkboxes',
@@ -210,7 +209,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['language'] = array(
'#type' => 'details',
'#title' => t('Language settings'),
- '#collapsed' => TRUE,
'#group' => 'additional_settings',
);
@@ -229,7 +227,6 @@ function node_type_form($form, &$form_state, $type = NULL) {
$form['display'] = array(
'#type' => 'details',
'#title' => t('Display settings'),
- '#collapsed' => TRUE,
'#group' => 'additional_settings',
);
$form['display']['node_submitted'] = array(
diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php
index 5145a57..d0d371e 100644
--- a/core/modules/node/lib/Drupal/node/NodeFormController.php
+++ b/core/modules/node/lib/Drupal/node/NodeFormController.php
@@ -124,7 +124,7 @@ public function form(array $form, array &$form_state) {
'#group' => 'advanced',
'#title' => t('Revision information'),
// Collapsed by default when "Create new revision" is unchecked.
- '#collapsed' => !$node->isNewRevision(),
+ '#open' => $node->isNewRevision(),
'#attributes' => array(
'class' => array('node-form-revision-information'),
),
@@ -160,7 +160,6 @@ public function form(array $form, array &$form_state) {
'#type' => 'details',
'#access' => user_access('administer nodes'),
'#title' => t('Authoring information'),
- '#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('node-form-author'),
@@ -199,7 +198,6 @@ public function form(array $form, array &$form_state) {
'#type' => 'details',
'#access' => user_access('administer nodes'),
'#title' => t('Promotion options'),
- '#collapsed' => TRUE,
'#group' => 'advanced',
'#attributes' => array(
'class' => array('node-form-options'),
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 5c934df..219e175 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1964,7 +1964,6 @@ function node_form_block_form_alter(&$form, &$form_state) {
$form['visibility']['node_type'] = array(
'#type' => 'details',
'#title' => t('Content types'),
- '#collapsed' => TRUE,
'#group' => 'visibility',
'#weight' => 5,
);
@@ -2243,7 +2242,6 @@ function node_form_search_form_alter(&$form, $form_state) {
$form['advanced'] = array(
'#type' => 'details',
'#title' => t('Advanced search'),
- '#collapsed' => TRUE,
'#attributes' => array('class' => array('search-advanced')),
);
$form['advanced']['keywords-fieldset'] = array(
@@ -2304,10 +2302,9 @@ function node_form_search_form_alter(&$form, $form_state) {
}
if (count($language_options) > 1) {
$form['advanced']['lang-fieldset'] = array(
- '#type' => 'fieldset',
+ '#type' => 'details',
'#title' => t('Languages'),
- '#collapsible' => FALSE,
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
$form['advanced']['lang-fieldset']['language'] = array(
'#type' => 'checkboxes',
diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 03be41b..800c53c 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -118,7 +118,7 @@ function path_form_node_form_alter(&$form, $form_state) {
$form['path'] = array(
'#type' => 'details',
'#title' => t('URL path settings'),
- '#collapsed' => empty($path['alias']),
+ '#open' => !empty($path['alias']),
'#group' => 'advanced',
'#attributes' => array(
'class' => array('path-form'),
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php
index 844e9ef..120440e 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php
@@ -169,7 +169,7 @@ public function buildForm(array $form, array &$form_state, $test_id = NULL) {
// Set summary information.
$group_summary['#ok'] = $group_summary['#fail'] + $group_summary['#exception'] == 0;
- $form['result']['results'][$group]['#collapsed'] = $group_summary['#ok'];
+ $form['result']['results'][$group]['#open'] = !$group_summary['#ok'];
// Store test group (class) as for use in filter.
$filter[$group_summary['#ok'] ? 'pass' : 'fail'][] = $group;
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php
index cce1a8a..917b935 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php
@@ -46,7 +46,6 @@ public function buildForm(array $form, array &$form_state) {
'#type' => 'details',
'#title' => t('HTTP authentication'),
'#description' => t('HTTP auth settings to be used by the SimpleTest browser during testing. Useful when the site requires basic HTTP authentication.'),
- '#collapsed' => TRUE,
);
$form['httpauth']['simpletest_httpauth_method'] = array(
'#type' => 'select',
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php
index 229211c..4b1e4f7 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php
@@ -41,10 +41,6 @@ public function buildForm(array $form, array &$form_state) {
$form_state['storage']['PHPUnit'] = $groups['PHPUnit'];
foreach ($groups as $group => $tests) {
- $form['tests']['table'][$group] = array(
- '#collapsed' => TRUE,
- );
-
foreach ($tests as $class => $info) {
$form['tests']['table'][$group][$class] = array(
'#type' => 'checkbox',
diff --git a/core/modules/simpletest/simpletest.theme.inc b/core/modules/simpletest/simpletest.theme.inc
index f7b5e6f..4021f7e 100644
--- a/core/modules/simpletest/simpletest.theme.inc
+++ b/core/modules/simpletest/simpletest.theme.inc
@@ -46,8 +46,8 @@ function theme_simpletest_test_table($variables) {
// Select the right "expand"/"collapse" image, depending on whether the
// category is expanded (at least one test selected) or not.
- $collapsed = !empty($element['#collapsed']);
- $image_index = $collapsed ? 0 : 1;
+ $open = !empty($element['#open']);
+ $image_index = $open ? 1 : 0;
// Place-holder for checkboxes to select group of tests.
$row[] = array('id' => $test_class, 'class' => array('simpletest-select-all'));
@@ -107,7 +107,7 @@ function theme_simpletest_test_table($variables) {
'class' => array('simpletest-test-description'),
);
- $rows[] = array('data' => $row, 'class' => array($test_class . '-test', ($collapsed ? 'js-hide' : '')));
+ $rows[] = array('data' => $row, 'class' => array($test_class . '-test', ($open ? '' : 'js-hide')));
}
$js['simpletest-test-group-' . $test_class] = $current_js;
unset($table[$key]);
diff --git a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php
index 7f2ab57..6bdca35 100644
--- a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php
+++ b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php
@@ -80,10 +80,10 @@ public function buildForm(array $form, array &$form_state) {
$definition = $toolkit->getDefinition();
$form['image_toolkit']['#options'][$id] = $definition['title'];
$form['image_toolkit_settings'][$id] = array(
- '#type' => 'fieldset',
+ '#type' => 'details',
'#title' => t('@toolkit settings', array('@toolkit' => $definition['title'])),
'#collapsible' => TRUE,
- '#collapsed' => ($id == $current_toolkit) ? FALSE : TRUE,
+ '#open' => ($id == $current_toolkit),
'#tree' => TRUE,
);
$form['image_toolkit_settings'][$id] += $toolkit->settingsForm();
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 1566c80..33e8fc5 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -962,6 +962,7 @@ function system_modules($form, $form_state = array()) {
'#type' => 'details',
'#title' => t($package),
'#theme' => 'system_modules_details',
+ '#open' => TRUE,
'#header' => array(
array('data' => t('Enabled'), 'class' => array('checkbox')),
array('data' => t('Name'), 'class' => array('name')),
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0d472e5..4dfec80 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -554,7 +554,7 @@ function system_element_info() {
'#theme_wrappers' => array('fieldset'),
);
$types['details'] = array(
- '#collapsed' => FALSE,
+ '#open' => FALSE,
'#value' => NULL,
'#process' => array('form_process_group', 'ajax_process_form'),
'#pre_render' => array('form_pre_render_details', 'form_pre_render_group'),
diff --git a/core/modules/system/tests/modules/design_test/form/details.inc b/core/modules/system/tests/modules/design_test/form/details.inc
index 60d153a..7925de0 100644
--- a/core/modules/system/tests/modules/design_test/form/details.inc
+++ b/core/modules/system/tests/modules/design_test/form/details.inc
@@ -13,7 +13,7 @@ function design_test_form_details($form, &$form_state) {
'#type' => 'details',
'#title' => 'Collapsible details',
'#description' => 'Details description',
- '#collapsed' => FALSE,
+ '#open' => TRUE,
'#states' => array(
'collapsed' => array(
':input[name="states-trigger"]' => array('checked' => TRUE),
@@ -25,7 +25,6 @@ function design_test_form_details($form, &$form_state) {
'#type' => 'details',
'#title' => 'Collapsed details',
'#description' => 'Details description',
- '#collapsed' => TRUE,
);
$form['collapsed']['textfield'] = array(
'#type' => 'textfield',
@@ -46,19 +45,17 @@ function design_test_form_details($form, &$form_state) {
'#type' => 'details',
'#title' => 'Details',
'#description' => 'Details description',
- '#collapsed' => TRUE,
);
$form['collapsed2']['collapsible'] = array(
'#type' => 'details',
'#title' => 'Collapsible details',
'#description' => 'Details description',
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
$form['collapsed2']['collapsed'] = array(
'#type' => 'details',
'#title' => 'Collapsed details',
'#description' => 'Details description',
- '#collapsed' => TRUE,
);
$form['collapsed2']['regular'] = array(
'#type' => 'details',
diff --git a/core/modules/system/tests/modules/design_test/form/fieldset.inc b/core/modules/system/tests/modules/design_test/form/fieldset.inc
index f55bfe5..1c1503f 100644
--- a/core/modules/system/tests/modules/design_test/form/fieldset.inc
+++ b/core/modules/system/tests/modules/design_test/form/fieldset.inc
@@ -19,7 +19,7 @@ function design_test_form_fieldset($form, &$form_state) {
'#type' => 'details',
'#title' => 'Collapsible details',
'#description' => 'Details description',
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
$form['collapsible']['fieldset'] = array(
'#type' => 'fieldset',
@@ -40,7 +40,6 @@ function design_test_form_fieldset($form, &$form_state) {
$form['collapsed'] = $form['collapsible'];
$form['collapsed']['#title'] = 'Collapsed details';
- $form['collapsed']['#collapsed'] = TRUE;
$form['nested'] = $form['regular'];
$form['nested']['#title'] = 'Parent fieldset';
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
index 24d252b..fa9e1ca 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
@@ -53,7 +53,7 @@ public function form(array $form, array &$form_state) {
$form['relations'] = array(
'#type' => 'details',
'#title' => t('Relations'),
- '#collapsed' => ($vocabulary->hierarchy != TAXONOMY_HIERARCHY_MULTIPLE),
+ '#open' => ($vocabulary->hierarchy == TAXONOMY_HIERARCHY_MULTIPLE),
'#weight' => 10,
);
diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module
index f62832d..884c008 100644
--- a/core/modules/translation/translation.module
+++ b/core/modules/translation/translation.module
@@ -215,7 +215,7 @@ function translation_form_node_form_alter(&$form, &$form_state) {
'#type' => 'details',
'#title' => t('Translation settings'),
'#access' => translation_user_can_translate_node($node),
- '#collapsed' => !$node->translate,
+ '#open' => $node->translate,
'#tree' => TRUE,
'#weight' => 30,
);
diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
index 4ffc6ef..6a3015a 100644
--- a/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
+++ b/core/modules/translation_entity/lib/Drupal/translation_entity/EntityTranslationController.php
@@ -156,7 +156,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
$form['source_langcode'] = array(
'#type' => 'details',
'#title' => t('Source language: @language', array('@language' => $languages[$source_langcode]->name)),
- '#collapsed' => TRUE,
'#tree' => TRUE,
'#weight' => -100,
'#multilingual' => TRUE,
@@ -224,7 +223,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac
$form['translation_entity'] = array(
'#type' => 'details',
'#title' => t('Translation'),
- '#collapsed' => TRUE,
'#tree' => TRUE,
'#weight' => 10,
'#access' => $this->getTranslationAccess($entity, $source_langcode ? 'create' : 'update'),
diff --git a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php
index b3d0d17..0cabd0b 100644
--- a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php
+++ b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php
@@ -182,7 +182,7 @@ public function buildForm(array $form, array &$form_state) {
$form['email_admin_created'] = array(
'#type' => 'details',
'#title' => t('Welcome (new user created by administrator)'),
- '#collapsed' => ($config->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY),
+ '#open' => ($config->get('register') == USER_REGISTER_ADMINISTRATORS_ONLY),
'#description' => t('Edit the welcome e-mail messages sent to new member accounts created by an administrator.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -202,7 +202,7 @@ public function buildForm(array $form, array &$form_state) {
$form['email_pending_approval'] = array(
'#type' => 'details',
'#title' => t('Welcome (awaiting approval)'),
- '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL),
+ '#open' => ($config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL),
'#description' => t('Edit the welcome e-mail messages sent to new members upon registering, when administrative approval is required.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -222,7 +222,7 @@ public function buildForm(array $form, array &$form_state) {
$form['email_pending_approval_admin'] = array(
'#type' => 'details',
'#title' => t('Admin (user awaiting approval)'),
- '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL),
+ '#open' => ($config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL),
'#description' => t('Edit the e-mail notifying the site administrator that there are new members awaiting administrative approval.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -242,7 +242,7 @@ public function buildForm(array $form, array &$form_state) {
$form['email_no_approval_required'] = array(
'#type' => 'details',
'#title' => t('Welcome (no approval required)'),
- '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS),
+ '#open' => ($config->get('register') == USER_REGISTER_VISITORS),
'#description' => t('Edit the welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -262,7 +262,6 @@ public function buildForm(array $form, array &$form_state) {
$form['email_password_reset'] = array(
'#type' => 'details',
'#title' => t('Password recovery'),
- '#collapsed' => TRUE,
'#description' => t('Edit the e-mail messages sent to users who request a new password.') . ' ' . $email_token_help,
'#group' => 'email',
'#weight' => 10,
@@ -283,7 +282,6 @@ public function buildForm(array $form, array &$form_state) {
$form['email_activated'] = array(
'#type' => 'details',
'#title' => t('Account activation'),
- '#collapsed' => TRUE,
'#description' => t('Enable and edit e-mail messages sent to users upon account activation (when an administrator activates an account of a user who has already registered, on a site where administrative approval is required).') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -317,7 +315,6 @@ public function buildForm(array $form, array &$form_state) {
$form['email_blocked'] = array(
'#type' => 'details',
'#title' => t('Account blocked'),
- '#collapsed' => TRUE,
'#description' => t('Enable and edit e-mail messages sent to users when their accounts are blocked.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -351,7 +348,6 @@ public function buildForm(array $form, array &$form_state) {
$form['email_cancel_confirm'] = array(
'#type' => 'details',
'#title' => t('Account cancellation confirmation'),
- '#collapsed' => TRUE,
'#description' => t('Edit the e-mail messages sent to users when they attempt to cancel their accounts.') . ' ' . $email_token_help,
'#group' => 'email',
);
@@ -371,7 +367,6 @@ public function buildForm(array $form, array &$form_state) {
$form['email_canceled'] = array(
'#type' => 'details',
'#title' => t('Account canceled'),
- '#collapsed' => TRUE,
'#description' => t('Enable and edit e-mail messages sent to users when their accounts are canceled.') . ' ' . $email_token_help,
'#group' => 'email',
);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
index 3f510aa..975106e 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
@@ -290,7 +290,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['more'] = array(
'#type' => 'details',
'#title' => t('More'),
- '#collapsed' => TRUE,
'#weight' => 150,
);
// Allow to alter the default values brought into the form.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
index 2c36002..248cd2d 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
@@ -320,7 +320,6 @@ public function globalTokenForm(&$form, &$form_state) {
$form['global_tokens'] = array(
'#type' => 'fieldset',
'#title' => t('Available global token replacements'),
- '#collapsed' => TRUE,
);
$form['global_tokens']['list'] = array(
'#theme' => 'item_list',
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
index a8cfb8a..e2e1cd5 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
@@ -107,7 +107,6 @@ public function tokenForm(&$form, &$form_state) {
$form['tokens'] = array(
'#type' => 'details',
'#title' => t('Replacement patterns'),
- '#collapsed' => TRUE,
'#id' => 'edit-options-token-help',
'#states' => array(
'visible' => array(
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
index 117ade9..83c9347 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
@@ -193,7 +193,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['exception'] = array(
'#type' => 'details',
'#title' => t('Exceptions'),
- '#collapsed' => TRUE,
'#fieldset' => 'no_argument',
);
$form['exception']['value'] = array(
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
index bc8dfff..f59aacc 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
@@ -535,7 +535,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['style_settings'] = array(
'#type' => 'details',
'#title' => t('Style settings'),
- '#collapsed' => TRUE,
'#weight' => 99,
);
@@ -684,7 +683,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['alter'] = array(
'#title' => t('Rewrite results'),
'#type' => 'details',
- '#collapsed' => TRUE,
'#weight' => 100,
);
@@ -885,7 +883,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['alter']['help'] = array(
'#type' => 'details',
'#title' => t('Replacement patterns'),
- '#collapsed' => TRUE,
'#value' => $output,
'#states' => array(
'visible' => array(
@@ -1024,7 +1021,6 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['empty_field_behavior'] = array(
'#type' => 'details',
'#title' => t('No results behavior'),
- '#collapsed' => TRUE,
'#weight' => 100,
);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php
index f7eb34b..2d01dcb 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php
@@ -75,7 +75,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['tags'] = array(
'#type' => 'details',
- '#collapsed' => FALSE,
+ '#open' => TRUE,
'#tree' => TRUE,
'#title' => t('Pager link labels'),
'#input' => TRUE,
@@ -95,7 +95,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['expose'] = array(
'#type' => 'details',
- '#collapsed' => FALSE,
+ '#open' => TRUE,
'#tree' => TRUE,
'#title' => t('Exposed options'),
'#input' => TRUE,
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php
index 67b1004..a5bd242 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php
@@ -92,7 +92,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$form['guid_field_options'] = array(
'#type' => 'details',
'#title' => t('GUID settings'),
- '#collapsed' => FALSE,
+ '#open' => TRUE,
);
$form['guid_field_options']['guid_field'] = array(
'#type' => 'select',
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index 9f3e0b6..7a45fc8 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -457,7 +457,6 @@ public function getDisplayDetails($view, $display) {
$build['columns']['third'] = array(
'#type' => 'details',
'#title' => t('Advanced'),
- '#collapsed' => TRUE,
'#theme_wrappers' => array('details', 'container'),
'#attributes' => array(
'class' => array(
@@ -468,9 +467,7 @@ public function getDisplayDetails($view, $display) {
);
// Collapse the details by default.
- if (config('views.settings')->get('ui.show.advanced_column')) {
- $build['columns']['third']['#collapsed'] = FALSE;
- }
+ $build['columns']['third']['#open'] = config('views.settings')->get('ui.show.advanced_column');
// Each option (e.g. title, access, display as grid/table/list) fits into one
// of several "buckets," or boxes (Format, Fields, Sort, and so on).
diff --git a/core/update.php b/core/update.php
index cee23c4..6687ce9 100644
--- a/core/update.php
+++ b/core/update.php
@@ -67,7 +67,6 @@ function update_script_selection_form($form, &$form_state) {
$form['start'] = array(
'#tree' => TRUE,
'#type' => 'details',
- '#collapsed' => TRUE,
);
// Ensure system.module's updates appear first.