diff --git a/core/includes/form.inc b/core/includes/form.inc index 05b6d29..dd54069 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -2886,7 +2886,7 @@ 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, + * Properties used: #attributes, #children, #description, #id, * #title, #value. * * @ingroup themeable @@ -2932,7 +2932,7 @@ 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, + * Properties used: #attributes, #children, #open, #description, #id, * #title, #value. * * @ingroup themeable @@ -2950,7 +2950,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'] . ''; } @@ -3926,7 +3926,7 @@ function form_pre_render_details($element) { // Collapsible details. $element['#attached']['library'][] = array('system', 'drupal.collapse'); - if (empty($element['#collapsed'])) { + if (!empty($element['#open'])) { $element['#attributes']['open'] = 'open'; } diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 644ec57..5b8d449 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2417,6 +2417,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { $form['site_information'] = array( '#type' => 'details', '#title' => t('Site information'), + '#open' => TRUE, ); $form['site_information']['site_name'] = array( '#type' => 'textfield', @@ -2435,6 +2436,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { $form['admin_account'] = array( '#type' => 'details', '#title' => t('Site maintenance account'), + '#open' => TRUE, ); $form['admin_account']['account']['#tree'] = TRUE; @@ -2463,6 +2465,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { $form['regional_settings'] = array( '#type' => 'details', '#title' => t('Regional settings'), + '#open' => TRUE, ); $countries = \Drupal::service('country_manager')->getList(); @@ -2489,6 +2492,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { $form['update_notifications'] = array( '#type' => 'details', '#title' => t('Update notifications'), + '#open' => TRUE, ); $form['update_notifications']['update_status_module'] = array( '#type' => 'checkboxes', diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php index df58c25..3e0e0af 100644 --- a/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -238,7 +238,6 @@ public function getFormOptions($database) { $form['advanced_options'] = array( '#type' => 'details', '#title' => t('Advanced options'), - '#collapsed' => TRUE, '#description' => t("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 d94e9c7..bc74287 100644 --- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php +++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php @@ -405,7 +405,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/action/lib/Drupal/action/Form/ActionAdminManageForm.php b/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php index 3b221db..7f5f58e 100644 --- a/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php +++ b/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php @@ -65,6 +65,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('Create an advanced action'), '#attributes' => array('class' => array('container-inline')), + '#open' => TRUE, ); $form['parent']['action'] = array( '#type' => 'select', diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php index 85e96e0..555fee6 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php @@ -149,7 +149,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('Basic configuration'), '#description' => $this->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 ec7d193..428fd71 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 @@ -85,7 +85,7 @@ public function buildConfigurationForm(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/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php index 04a5c5a..1864b65 100644 --- a/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php +++ b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php @@ -76,7 +76,7 @@ public function buildConfigurationForm(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 d64e3de..937614b 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 @@ -95,9 +95,8 @@ public function form(array $form, array &$form_state) { $form['revision_information'] = array( '#type' => 'details', '#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 a3e143f..6566a10 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 @@ -57,8 +57,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 3915315..767d119 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php @@ -130,7 +130,6 @@ public function form(array $form, array &$form_state) { $form['visibility']['path'] = array( '#type' => 'details', '#title' => $this->t('Pages'), - '#collapsed' => TRUE, '#group' => 'visibility', '#weight' => 0, ); @@ -186,7 +185,6 @@ public function form(array $form, array &$form_state) { $form['visibility']['language'] = array( '#type' => 'details', '#title' => $this->t('Languages'), - '#collapsed' => TRUE, '#group' => 'visibility', '#weight' => 5, ); @@ -219,7 +217,6 @@ public function form(array $form, array &$form_state) { $form['visibility']['role'] = array( '#type' => 'details', '#title' => $this->t('Roles'), - '#collapsed' => TRUE, '#group' => 'visibility', '#weight' => 10, ); diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockListController.php index 697f09b..100e937 100644 --- a/core/modules/block/lib/Drupal/block/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/BlockListController.php @@ -347,6 +347,7 @@ public function buildForm(array $form, array &$form_state) { $form['place_blocks']['list'][$category] = array( '#type' => 'details', '#title' => $category, + '#open' => TRUE, 'content' => array( '#theme' => 'links', '#links' => array(), diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php index d154c46..6d90b45 100644 --- a/core/modules/book/lib/Drupal/book/BookManager.php +++ b/core/modules/book/lib/Drupal/book/BookManager.php @@ -177,7 +177,6 @@ public function addFormElements(array $form, array &$form_state, NodeInterface $ '#type' => 'details', '#title' => $this->t('Book outline'), '#weight' => 10, - '#collapsed' => TRUE, '#group' => 'advanced', '#attributes' => array( 'class' => array('book-outline-form'), diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php index 636d82b..86863f8 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php @@ -150,6 +150,7 @@ public function injectPluginSettingsForm(array &$form, array &$form_state, Edito '#type' => 'details', '#title' => $definitions[$plugin_id]['label'], '#group' => 'editor][settings][plugin_settings', + '#open' => TRUE, ); $form['plugins'][$plugin_id] += $plugin->settingsForm($plugin_settings_form, $form_state, $editor); } diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 8cc6223..d90dc1d 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -47,6 +47,7 @@ function color_form_system_theme_settings_alter(&$form, &$form_state) { '#weight' => -1, '#attributes' => array('id' => 'color_scheme_form'), '#theme' => 'color_scheme_form', + '#open' => TRUE, ); $form['color'] += color_scheme_form($form, $form_state, $theme); $form['#validate'][] = 'color_scheme_form_validate'; diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc index 02f2278..cf31696 100644 --- a/core/modules/comment/comment.admin.inc +++ b/core/modules/comment/comment.admin.inc @@ -49,6 +49,7 @@ function comment_admin_overview($form, &$form_state, $arg) { '#type' => 'details', '#title' => t('Update options'), '#attributes' => array('class' => array('container-inline')), + '#open' => TRUE, ); if ($arg == 'approval') { diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php index 4555e8f..30ead19 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php @@ -102,7 +102,6 @@ public function form(array $form, array &$form_state) { $form['author'] += array( '#type' => 'details', '#title' => $this->t('Administration'), - '#collapsed' => TRUE, ); } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/field/field_type/CommentItem.php b/core/modules/comment/lib/Drupal/comment/Plugin/field/field_type/CommentItem.php index 432534f..bc8eec0 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/field/field_type/CommentItem.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/field/field_type/CommentItem.php @@ -116,8 +116,7 @@ public function instanceSettingsForm(array $form, array &$form_state) { $element['comment'] = array( '#type' => 'details', '#title' => t('Comment form settings'), - '#collapsible' => TRUE, - '#collapsed' => FALSE, + '#open' => TRUE, '#bundle' => "{$entity_type}__{$field_name}", '#process' => array(array(get_class($this), 'processSettingsElement')), '#attributes' => array( diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/field/widget/CommentWidget.php b/core/modules/comment/lib/Drupal/comment/Plugin/field/widget/CommentWidget.php index dadc51c..a93a12a 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/field/widget/CommentWidget.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/field/widget/CommentWidget.php @@ -72,7 +72,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen '#type' => 'details', // Collapse this field when the selected value is the same as stored in // default values for the field instance. - '#collapsed' => ($items->status == $field_default_values[0]['status']), + '#open' => ($items->status != $field_default_values[0]['status']), '#group' => 'advanced', '#attributes' => array( 'class' => array('comment-' . drupal_html_class($element['#entity_type']) . '-settings-form'), diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 4cdea75..6e0785c 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -258,6 +258,7 @@ function contact_form_user_form_alter(&$form, &$form_state) { '#type' => 'details', '#title' => t('Contact settings'), '#weight' => 5, + '#open' => TRUE, ); $account = $form_state['controller']->getEntity(); $account_data = !user_is_anonymous() ? \Drupal::service('user.data')->get('contact', $account->id(), 'enabled') : NULL; @@ -292,6 +293,7 @@ function contact_form_user_admin_settings_alter(&$form, &$form_state) { '#type' => 'details', '#title' => t('Contact settings'), '#weight' => 0, + '#open' => TRUE, ); $form['contact']['contact_default_status'] = array( '#type' => 'checkbox', diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php index 77ac782..59b4eb9 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php @@ -149,7 +149,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, @@ -219,7 +218,6 @@ public function entityFormAlter(array &$form, array &$form_state, EntityInterfac $form['content_translation'] = 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/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index 9a5ef3b..e99b060 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -124,7 +124,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( @@ -201,7 +201,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/entity_reference/lib/Drupal/entity_reference/Plugin/field/field_type/ConfigurableEntityReferenceItem.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/field_type/ConfigurableEntityReferenceItem.php index ee5e79a..ad3f990 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/field_type/ConfigurableEntityReferenceItem.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/field_type/ConfigurableEntityReferenceItem.php @@ -160,6 +160,7 @@ public function instanceSettingsForm(array $form, array &$form_state) { '#title' => t('Reference type'), '#tree' => TRUE, '#process' => array('_entity_reference_form_process_merge_parent'), + '#open' => TRUE, ); $form['handler']['handler'] = array( 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 ea74a94..8a4823a 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 @@ -457,7 +457,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/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc index 3d4b0fa..068f2f1 100644 --- a/core/modules/field/tests/modules/field_test/field_test.entity.inc +++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc @@ -62,6 +62,7 @@ function field_test_entity_nested_form($form, &$form_state, $entity_1, $entity_2 '#tree' => TRUE, '#parents' => array('entity_2'), '#weight' => 50, + '#open' => TRUE, ); foreach (array('id', 'type') as $key) { $form['entity_2'][$key] = array( diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php index edd687a..9854e93 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php @@ -143,7 +143,6 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, $form['modes'] = array( '#type' => 'details', '#title' => $this->t('Custom display settings'), - '#collapsed' => TRUE, ); // Collect options and default values for the 'Custom display settings' // checkboxes. diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php index 68c5bfb..717bc4e 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php @@ -143,6 +143,7 @@ public function buildForm(array $form, array &$form_state, FieldInstanceInterfac '#type' => 'details', '#title' => $this->t('Default value'), '#description' => $this->t('The default value for this field, used when creating new content.'), + '#open' => TRUE, ); $form['instance']['default_value'] = $element; } diff --git a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php index 01f4aec..8ee6c69 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php +++ b/core/modules/file/lib/Drupal/file/Plugin/field/widget/FileWidget.php @@ -144,6 +144,7 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f // building up the full list (like draggable table rows). $elements['#file_upload_delta'] = $delta; $elements['#type'] = 'details'; + $elements['#open'] = TRUE; $elements['#theme'] = 'file_widget_multiple'; $elements['#theme_wrappers'] = array('details'); $elements['#process'] = array('file_field_widget_process_multiple'); diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php index bd42969..25c61ed 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php @@ -189,6 +189,7 @@ public function form(array $form, array &$form_state) { '#weight' => $filter->weight, '#parents' => array('filters', $name, 'settings'), '#group' => 'filter_settings', + '#open' => TRUE, ); $form['filters']['settings'][$name] += $settings_form; } diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php index b801b2b..410992c 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php @@ -109,7 +109,6 @@ public function buildForm(array $form, array &$form_state) { $form['new_mapping'] = array( '#type' => 'details', '#title' => $this->t('Add a new mapping'), - '#collapsed' => TRUE, '#tree' => TRUE, ); $form['new_mapping']['browser_langcode'] = array( diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationUrlForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationUrlForm.php index 6855a24..f015113 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationUrlForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationUrlForm.php @@ -43,6 +43,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#tree' => TRUE, '#title' => t('Path prefix configuration'), + '#open' => TRUE, '#description' => t('Language codes or other custom text to use as a path prefix for URL language detection. For the default language, this value may be left blank. Modifying this value may break existing URLs. Use with caution in a production environment. Example: Specifying "deutsch" as the path prefix code for German results in URLs like "example.com/deutsch/contact".'), '#states' => array( 'visible' => array( @@ -55,6 +56,7 @@ public function buildForm(array $form, array &$form_state) { $form['domain'] = array( '#type' => 'details', '#tree' => TRUE, + '#open' => TRUE, '#title' => t('Domain configuration'), '#description' => t('The domain names to use for these languages. Leave blank for the default language. Use with caution in a production environment.Modifying this value may break existing URLs. Use with caution in a production environment. Example: Specifying "de.example.com" as language domain for German will result in an URL like "http://de.example.com/contact".'), '#states' => array( diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php index 4585602..0a8256e 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php @@ -33,7 +33,7 @@ public function buildForm(array $form, array &$form_state) { $form['filters'] = array( '#type' => 'details', '#title' => $this->t('Filter translatable strings'), - '#collapsed' => FALSE, + '#open' => TRUE, ); foreach ($filters as $key => $filter) { // Special case for 'string' filter. diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 8a7d547..a91d7ff 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -182,7 +182,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/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php index 68bc6a4..e3391ca 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php @@ -113,6 +113,7 @@ public function form(array $form, array &$form_state) { $form['default_menu_links_language'] = array( '#type' => 'details', '#title' => t('Menu links language'), + '#open' => TRUE, ); $form['default_menu_links_language']['default_language'] = array( '#type' => 'language_configuration', diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 70cf6e6..06bb1b1 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -488,7 +488,7 @@ function menu_form_node_form_alter(&$form, $form_state) { '#type' => 'details', '#title' => t('Menu settings'), '#access' => \Drupal::currentUser()->hasPermission('administer menu'), - '#collapsed' => !$link['link_title'], + '#open' => !!$link['link_title'], '#group' => 'advanced', '#attached' => array( 'library' => array(array('menu', 'drupal.menu')), @@ -588,7 +588,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/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index f0c0ae8..a5c9063 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -133,7 +133,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'), ), @@ -169,7 +169,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'), @@ -208,7 +207,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/lib/Drupal/node/NodeTypeFormController.php b/core/modules/node/lib/Drupal/node/NodeTypeFormController.php index d9d5666..ee99b54 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeFormController.php @@ -78,6 +78,7 @@ public function form(array $form, array &$form_state) { '#type' => 'details', '#title' => t('Submission form settings'), '#group' => 'additional_settings', + '#open' => TRUE, ); $form['submission']['title_label'] = array( '#title' => t('Title field label'), @@ -112,7 +113,6 @@ public function form(array $form, array &$form_state) { $form['workflow'] = array( '#type' => 'details', '#title' => t('Publishing options'), - '#collapsed' => TRUE, '#group' => 'additional_settings', ); $form['workflow']['options'] = array('#type' => 'checkboxes', @@ -131,7 +131,6 @@ public function form(array $form, array &$form_state) { $form['language'] = array( '#type' => 'details', '#title' => t('Language settings'), - '#collapsed' => TRUE, '#group' => 'additional_settings', ); @@ -148,7 +147,6 @@ public function form(array $form, array &$form_state) { $form['display'] = array( '#type' => 'details', '#title' => t('Display settings'), - '#collapsed' => TRUE, '#group' => 'additional_settings', ); $form['display']['submitted'] = array( diff --git a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php index bf987e6..f992d3f 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php @@ -371,14 +371,12 @@ public function searchFormAlter(array &$form, array &$form_state) { $form['advanced'] = array( '#type' => 'details', '#title' => t('Advanced search'), - '#collapsed' => TRUE, '#attributes' => array('class' => array('search-advanced')), '#access' => $this->account && $this->account->hasPermission('use advanced search'), ); $form['advanced']['keywords-fieldset'] = array( '#type' => 'fieldset', '#title' => t('Keywords'), - '#collapsible' => FALSE, ); $form['advanced']['keywords'] = array( '#prefix' => '
', @@ -409,7 +407,6 @@ public function searchFormAlter(array &$form, array &$form_state) { $form['advanced']['types-fieldset'] = array( '#type' => 'fieldset', '#title' => t('Types'), - '#collapsible' => FALSE, ); $form['advanced']['types-fieldset']['type'] = array( '#type' => 'checkboxes', @@ -436,8 +433,7 @@ public function searchFormAlter(array &$form, array &$form_state) { $form['advanced']['lang-fieldset'] = array( '#type' => 'fieldset', '#title' => t('Languages'), - '#collapsible' => FALSE, - '#collapsed' => FALSE, + '#open' => TRUE, ); $form['advanced']['lang-fieldset']['language'] = array( '#type' => 'checkboxes', @@ -521,6 +517,7 @@ public function addToAdminForm(array &$form, array &$form_state) { $form['content_ranking'] = array( '#type' => 'details', '#title' => t('Content ranking'), + '#open' => TRUE, ); $form['content_ranking']['#theme'] = 'node_search_admin'; $form['content_ranking']['info'] = array( diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 24f46ec..ac9d74e 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1272,7 +1272,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, ); diff --git a/core/modules/path/path.admin.inc b/core/modules/path/path.admin.inc index 4c5b3f4..8f85121 100644 --- a/core/modules/path/path.admin.inc +++ b/core/modules/path/path.admin.inc @@ -280,9 +280,11 @@ function path_admin_form_submit($form, &$form_state) { */ function path_admin_filter_form($form, &$form_state, $keys = '') { $form['#attributes'] = array('class' => array('search-form')); - $form['basic'] = array('#type' => 'details', + $form['basic'] = array( + '#type' => 'details', '#title' => t('Filter aliases'), '#attributes' => array('class' => array('container-inline')), + '#open' => TRUE, ); $form['basic']['filter'] = array( '#type' => 'search', diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 984650a..cf64b07 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -111,7 +111,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/search/lib/Drupal/search/Form/SearchSettingsForm.php b/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php index b91b588..e3e0801 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchSettingsForm.php @@ -127,6 +127,7 @@ public function buildForm(array $form, array &$form_state) { $form['status'] = array( '#type' => 'details', '#title' => $this->t('Indexing status'), + '#open' => TRUE, ); $form['status']['status'] = array('#markup' => $status); $form['status']['wipe'] = array( @@ -140,7 +141,8 @@ public function buildForm(array $form, array &$form_state) { // Indexing throttle: $form['indexing_throttle'] = array( '#type' => 'details', - '#title' => $this->t('Indexing throttle') + '#title' => $this->t('Indexing throttle'), + '#open' => TRUE, ); $form['indexing_throttle']['cron_limit'] = array( '#type' => 'select', @@ -152,7 +154,8 @@ public function buildForm(array $form, array &$form_state) { // Indexing settings: $form['indexing_settings'] = array( '#type' => 'details', - '#title' => $this->t('Indexing settings') + '#title' => $this->t('Indexing settings'), + '#open' => TRUE, ); $form['indexing_settings']['info'] = array( '#markup' => $this->t('

Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won\'t be indexed until all existing content has been re-indexed.

The default settings should be appropriate for the majority of sites.

') @@ -174,7 +177,8 @@ public function buildForm(array $form, array &$form_state) { $form['active'] = array( '#type' => 'details', - '#title' => $this->t('Active search plugins') + '#title' => $this->t('Active search plugins'), + '#open' => TRUE, ); $options = $this->getOptions(); $form['active']['active_plugins'] = array( diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php index d1d339a..d59bf76 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php @@ -144,6 +144,7 @@ public function buildForm(array $form, array &$form_state, $test_id = NULL) { '#type' => 'details', '#title' => $info['name'], '#description' => $info['description'], + '#open' => TRUE, ); $form['result']['results'][$group]['summary'] = $summary; $group_summary =& $form['result']['results'][$group]['summary']; @@ -176,7 +177,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 ed65884..1f9f277 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestSettingsForm.php @@ -29,6 +29,7 @@ public function buildForm(array $form, array &$form_state) { $form['general'] = array( '#type' => 'details', '#title' => $this->t('General'), + '#open' => TRUE, ); $form['general']['simpletest_clear_results'] = array( '#type' => 'checkbox', @@ -47,7 +48,6 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('HTTP authentication'), '#description' => $this->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 7d7a8c5..c6c4148 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php @@ -49,6 +49,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('Tests'), '#description' => $this->t('Select the test(s) or test group(s) you would like to run, and click Run tests.'), + '#open' => TRUE, ); $form['tests']['table'] = array( @@ -61,10 +62,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 4ee0261..a1bd055 100644 --- a/core/modules/simpletest/simpletest.theme.inc +++ b/core/modules/simpletest/simpletest.theme.inc @@ -64,8 +64,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')); @@ -125,7 +125,7 @@ function theme_simpletest_test_table($variables) { 'class' => array('simpletest-test-description', 'table-filter-text-source'), ); - $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/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php b/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php index 437946f..0461d59 100644 --- a/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php +++ b/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php @@ -68,6 +68,7 @@ public function buildForm(array $form, array &$form_state) { $form['content'] = array( '#type' => 'details', '#title' => t('Content viewing counter settings'), + '#open' => TRUE, ); $form['content']['statistics_count_content_views'] = array( '#type' => 'checkbox', diff --git a/core/modules/system/lib/Drupal/system/Form/CronForm.php b/core/modules/system/lib/Drupal/system/Form/CronForm.php index 12802e4..84bd4b3 100644 --- a/core/modules/system/lib/Drupal/system/Form/CronForm.php +++ b/core/modules/system/lib/Drupal/system/Form/CronForm.php @@ -86,6 +86,7 @@ public function buildForm(array $form, array &$form_state) { $form['cron'] = array( '#title' => t('Cron settings'), '#type' => 'details', + '#open' => TRUE, ); $form['cron']['cron_safe_threshold'] = array( '#type' => 'select', diff --git a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php index dcdb2cc..1a14aa4 100644 --- a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php @@ -82,8 +82,7 @@ public function buildForm(array $form, array &$form_state) { $form['image_toolkit_settings'][$id] = array( '#type' => 'fieldset', '#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/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php index 28836dd..2d75d50 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -115,6 +115,7 @@ public function buildForm(array $form, array &$form_state) { $form['modules'][$package] += array( '#type' => 'details', '#title' => $this->t($package), + '#open' => TRUE, '#theme' => 'system_modules_details', '#header' => array( array('data' => '' . $this->t('Installed') . '', 'class' => array('checkbox')), diff --git a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php index 8ae0382..618f6b5 100644 --- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php +++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php @@ -69,6 +69,7 @@ public function buildForm(array $form, array &$form_state) { $form['clear_cache'] = array( '#type' => 'details', '#title' => t('Clear cache'), + '#open' => TRUE, ); $form['clear_cache']['clear'] = array( @@ -80,6 +81,7 @@ public function buildForm(array $form, array &$form_state) { $form['caching'] = array( '#type' => 'details', '#title' => t('Caching'), + '#open' => TRUE, ); $period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), 'format_interval'); @@ -111,6 +113,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => t('Bandwidth optimization'), '#description' => t('External resources can be optimized automatically, which can reduce both the size and number of requests made to your website.') . $disabled_message, + '#open' => TRUE, ); $js_hide = ($config->get('cache.page.max_age') > 0) ? '' : ' class="js-hide"'; diff --git a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php index 569a5c6..26c10c0 100644 --- a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php +++ b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php @@ -71,6 +71,7 @@ public function buildForm(array $form, array &$form_state) { $form['locale'] = array( '#type' => 'details', '#title' => t('Locale'), + '#open' => TRUE, ); $form['locale']['site_default_country'] = array( @@ -92,6 +93,7 @@ public function buildForm(array $form, array &$form_state) { $form['timezone'] = array( '#type' => 'details', '#title' => t('Time zones'), + '#open' => TRUE, ); $form['timezone']['date_default_timezone'] = array( diff --git a/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php b/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php index 1b5029b..4ae4ae3 100644 --- a/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php +++ b/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php @@ -72,6 +72,7 @@ public function buildForm(array $form, array &$form_state) { $form['site_information'] = array( '#type' => 'details', '#title' => t('Site details'), + '#open' => TRUE, ); $form['site_information']['site_name'] = array( '#type' => 'textfield', @@ -95,6 +96,7 @@ public function buildForm(array $form, array &$form_state) { $form['front_page'] = array( '#type' => 'details', '#title' => t('Front page'), + '#open' => TRUE, ); $front_page = $site_config->get('page.front') != 'user' ? $this->aliasManager->getPathAlias($site_config->get('page.front')) : ''; $form['front_page']['site_frontpage'] = array( @@ -108,6 +110,7 @@ public function buildForm(array $form, array &$form_state) { $form['error_page'] = array( '#type' => 'details', '#title' => t('Error pages'), + '#open' => TRUE, ); $form['error_page']['site_403'] = array( '#type' => 'textfield', diff --git a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php index 44b34fe..5aa62aa 100644 --- a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php @@ -127,6 +127,7 @@ public function buildForm(array $form, array &$form_state, $theme_name = '') { '#type' => 'details', '#title' => t('Toggle display'), '#description' => t('Enable or disable the display of certain page elements.'), + '#open' => TRUE, ); foreach ($toggles as $name => $title) { if ((!$theme_name) || in_array($name, $features)) { @@ -150,6 +151,7 @@ public function buildForm(array $form, array &$form_state, $theme_name = '') { '#type' => 'details', '#title' => t('Logo image settings'), '#attributes' => array('class' => array('theme-settings-bottom')), + '#open' => TRUE, '#states' => array( // Hide the logo image settings fieldset when logo display is disabled. 'invisible' => array( @@ -190,6 +192,7 @@ public function buildForm(array $form, array &$form_state, $theme_name = '') { '#type' => 'details', '#title' => t('Shortcut icon settings'), '#description' => t("Your shortcut icon, or 'favicon', is displayed in the address bar and bookmarks of most browsers."), + '#open' => TRUE, '#states' => array( // Hide the shortcut icon settings fieldset when shortcut icon display // is disabled. @@ -266,6 +269,7 @@ public function buildForm(array $form, array &$form_state, $theme_name = '') { '#type' => 'details', '#title' => t('Theme-engine-specific settings'), '#description' => t('These settings only exist for the themes based on the %engine theme engine.', array('%engine' => $themes[$theme_name]->prefix)), + '#open' => TRUE, ); $function($form, $form_state); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php index 4a871d5..eb1e7f2 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php @@ -337,6 +337,7 @@ function testDrupalRenderChildrenAttached() { $subchild_js = drupal_get_path('module', 'book') . '/book.js'; $element = array( '#type' => 'details', + '#open' => TRUE, '#cache' => array( 'keys' => array('simpletest', 'drupal_render', 'children_attached'), ), @@ -345,6 +346,7 @@ function testDrupalRenderChildrenAttached() { ); $element['child'] = array( '#type' => 'details', + '#open' => TRUE, '#attached' => array('js' => array($child_js)), '#title' => 'Child', ); @@ -484,6 +486,7 @@ function testDrupalRenderFormElements() { $element = array( '#type' => 'details', '#title' => $this->randomName(), + '#open' => TRUE, ); $this->assertRenderedElement($element, '//details/summary[contains(., :title)]', array( ':title' => $element['#title'], @@ -492,6 +495,7 @@ function testDrupalRenderFormElements() { $element = array( '#type' => 'details', '#title' => $this->randomName(), + '#open' => TRUE, ); $this->assertRenderedElement($element, '//details'); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index f1a428f..426058c 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -161,6 +161,7 @@ function system_themes_admin_form($form, &$form_state, $theme_options) { $form['admin_theme'] = array( '#type' => 'details', '#title' => t('Administration theme'), + '#open' => TRUE, ); $form['admin_theme']['admin_theme'] = array( '#type' => 'select', @@ -591,7 +592,6 @@ function theme_system_modules_details($variables) { '#title' => ' ' . drupal_render($module['description']) . '', '#attributes' => array('id' => $module['enable']['#id'] . '-description'), '#description' => $description, - '#collapsed' => TRUE, ); $col4 = drupal_render($details); $row[] = array('class' => array('description', 'expand'), 'data' => $col4); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 8437e4c..e5aec32 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -545,7 +545,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'), @@ -2280,6 +2280,7 @@ function system_user_timezone(&$form, &$form_state) { '#type' => 'details', '#title' => t('Locale settings'), '#weight' => 6, + '#open' => TRUE, ); $form['timezone']['timezone'] = array( '#type' => 'select', 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..a5df90f 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,30 +45,30 @@ 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', '#title' => 'Details', '#description' => 'Details description', + '#open' => TRUE, ); $form['regular'] = array( '#type' => 'details', '#title' => 'Details', '#description' => 'Details description', + '#open' => TRUE, ); #$form['#attributes'] = array('class' => array('search-form')); @@ -77,6 +76,7 @@ function design_test_form_details($form, &$form_state) { '#type' => 'details', '#title' => 'Filter aliases', '#attributes' => array('class' => array('container-inline')), + '#open' => TRUE, ); $form['basic']['filter'] = array( '#type' => 'textfield', @@ -114,6 +114,7 @@ function design_test_form_details($form, &$form_state) { '#title' => 'Vertical tab 1', '#description' => 'Description', '#group' => 'group', + '#open' => TRUE, ); $form['tabs'][0] += $subform; @@ -122,6 +123,7 @@ function design_test_form_details($form, &$form_state) { '#title' => 'Vertical tab 2', '#description' => '

Description

Description

', '#group' => 'group', + '#open' => TRUE, ); $form['tabs'][1] += $subform; @@ -135,6 +137,7 @@ function design_test_form_details($form, &$form_state) { '#title' => 'Vertical tab 1', '#description' => 'Description', '#group' => 'subgroup', + '#open' => TRUE, ); $form['subtabs'][0] += $subform; @@ -143,6 +146,7 @@ function design_test_form_details($form, &$form_state) { '#title' => 'Vertical tab 2', '#description' => '

Description

Description

', '#group' => 'subgroup', + '#open' => TRUE, ); $form['subtabs'][1] += $subform; 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..3b953aa 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'; @@ -59,6 +58,7 @@ function design_test_form_fieldset($form, &$form_state) { '#title' => 'Vertical tab 1', '#description' => 'Description', '#group' => 'group', + '#open' => TRUE, ); $form['tabs'][0] += $subform; @@ -67,6 +67,7 @@ function design_test_form_fieldset($form, &$form_state) { '#title' => 'Vertical tab 2', '#description' => '

Description

Description

', '#group' => 'group', + '#open' => TRUE, ); $form['tabs'][1] += $subform; @@ -80,6 +81,7 @@ function design_test_form_fieldset($form, &$form_state) { '#title' => 'Vertical tab 1', '#description' => 'Description', '#group' => 'subgroup', + '#open' => TRUE, ); $form['subtabs'][0] += $subform; @@ -88,6 +90,7 @@ function design_test_form_fieldset($form, &$form_state) { '#title' => 'Vertical tab 2', '#description' => '

Description

Description

', '#group' => 'subgroup', + '#open' => TRUE, ); $form['subtabs'][1] += $subform; diff --git a/core/modules/system/tests/modules/form_test/form_test.module b/core/modules/system/tests/modules/form_test/form_test.module index 5b34e1b..6cf453e 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -845,7 +845,8 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#type' => 'details', '#title' => t('Tab 1'), '#group' => 'vertical_tabs', - '#access' => user_access('access vertical_tab_test tabs') + '#access' => user_access('access vertical_tab_test tabs'), + '#open' => TRUE, ); $form['tab1']['field1'] = array( '#title' => t('Field 1'), @@ -855,7 +856,8 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#type' => 'details', '#title' => t('Tab 2'), '#group' => 'vertical_tabs', - '#access' => user_access('access vertical_tab_test tabs') + '#access' => user_access('access vertical_tab_test tabs'), + '#open' => TRUE, ); $form['tab2']['field2'] = array( '#title' => t('Field 2'), @@ -2386,11 +2388,13 @@ function form_test_group_details() { $form['details'] = array( '#type' => 'details', '#title' => 'Root element', + '#open' => TRUE, ); $form['meta'] = array( '#type' => 'details', '#title' => 'Group element', '#group' => 'details', + '#open' => TRUE, ); $form['meta']['element'] = array( '#type' => 'textfield', @@ -2410,6 +2414,7 @@ function form_test_group_container() { '#type' => 'details', '#title' => 'Group element', '#group' => 'container', + '#open' => TRUE, ); $form['meta']['element'] = array( '#type' => 'textfield', @@ -2449,6 +2454,7 @@ function form_test_group_vertical_tabs() { '#type' => 'details', '#title' => 'First group element', '#group' => 'vertical_tabs', + '#open' => TRUE, ); $form['meta']['element'] = array( '#type' => 'textfield', @@ -2458,6 +2464,7 @@ function form_test_group_vertical_tabs() { '#type' => 'details', '#title' => 'Second group element', '#group' => 'vertical_tabs', + '#open' => TRUE, ); $form['meta_2']['element_2'] = array( '#type' => 'textfield', diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index b6bbb41..c4c55d0 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -94,7 +94,7 @@ public function form(array $form, array &$form_state) { $form['relations'] = array( '#type' => 'details', '#title' => $this->t('Relations'), - '#collapsed' => ($vocabulary->hierarchy != TAXONOMY_HIERARCHY_MULTIPLE), + '#open' => ($vocabulary->hierarchy == TAXONOMY_HIERARCHY_MULTIPLE), '#weight' => 10, ); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php index 0a1537b..72710b6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php @@ -57,6 +57,7 @@ public function form(array $form, array &$form_state) { $form['default_terms_language'] = array( '#type' => 'details', '#title' => $this->t('Terms language'), + '#open' => TRUE, ); $form['default_terms_language']['default_language'] = array( '#type' => 'language_configuration', diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module index bd1bf31..602bf0a 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->value, + '#open' => $node->translate->value, '#tree' => TRUE, '#weight' => 30, ); diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 138b86e..6748af4 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -167,6 +167,7 @@ public function form(array $form, array &$form_state) { '#title' => $this->t('Signature settings'), '#weight' => 1, '#access' => (!$register && $config->get('signatures')), + '#open' => TRUE, ); $form['signature_settings']['signature'] = array( @@ -190,6 +191,7 @@ public function form(array $form, array &$form_state) { // Display language selector when either creating a user on the admin // interface or editing a user account. '#access' => !$register || user_access('administer users'), + '#open' => TRUE, ); $form['language']['preferred_langcode'] = array( diff --git a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php index e8077d3..01ba636 100644 --- a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php +++ b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php @@ -70,6 +70,7 @@ public function buildForm(array $form, array &$form_state) { $form['anonymous_settings'] = array( '#type' => 'details', '#title' => $this->t('Anonymous users'), + '#open' => TRUE, ); $form['anonymous_settings']['anonymous'] = array( '#type' => 'textfield', @@ -83,6 +84,7 @@ public function buildForm(array $form, array &$form_state) { $form['admin_role'] = array( '#type' => 'details', '#title' => $this->t('Administrator role'), + '#open' => TRUE, ); // Do not allow users to set the anonymous or authenticated user roles as the // administrator role. @@ -103,6 +105,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('Language settings'), '#tree' => TRUE, + '#open' => TRUE, ); $form_state['content_translation']['key'] = 'language'; $form['language'] += content_translation_enable_widget('user', 'user', $form, $form_state); @@ -112,6 +115,7 @@ public function buildForm(array $form, array &$form_state) { $form['registration_cancellation'] = array( '#type' => 'details', '#title' => $this->t('Registration and cancellation'), + '#open' => TRUE, ); $form['registration_cancellation']['user_register'] = array( '#type' => 'radios', @@ -154,6 +158,7 @@ public function buildForm(array $form, array &$form_state) { $form['personalization'] = array( '#type' => 'details', '#title' => $this->t('Personalization'), + '#open' => TRUE, ); $form['personalization']['user_signatures'] = array( '#type' => 'checkbox', @@ -181,7 +186,7 @@ public function buildForm(array $form, array &$form_state) { $form['email_admin_created'] = array( '#type' => 'details', '#title' => $this->t('Welcome (new user created by administrator)'), - '#collapsed' => ($config->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY), + '#open' => ($config->get('register') == USER_REGISTER_ADMINISTRATORS_ONLY), '#description' => $this->t('Edit the welcome e-mail messages sent to new member accounts created by an administrator.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -201,7 +206,7 @@ public function buildForm(array $form, array &$form_state) { $form['email_pending_approval'] = array( '#type' => 'details', '#title' => $this->t('Welcome (awaiting approval)'), - '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL), + '#open' => ($config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL), '#description' => $this->t('Edit the welcome e-mail messages sent to new members upon registering, when administrative approval is required.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -221,7 +226,7 @@ public function buildForm(array $form, array &$form_state) { $form['email_pending_approval_admin'] = array( '#type' => 'details', '#title' => $this->t('Admin (user awaiting approval)'), - '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL), + '#open' => ($config->get('register') == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL), '#description' => $this->t('Edit the e-mail notifying the site administrator that there are new members awaiting administrative approval.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -241,7 +246,7 @@ public function buildForm(array $form, array &$form_state) { $form['email_no_approval_required'] = array( '#type' => 'details', '#title' => $this->t('Welcome (no approval required)'), - '#collapsed' => ($config->get('register') != USER_REGISTER_VISITORS), + '#open' => ($config->get('register') == USER_REGISTER_VISITORS), '#description' => $this->t('Edit the welcome e-mail messages sent to new members upon registering, when no administrator approval is required.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -261,7 +266,6 @@ public function buildForm(array $form, array &$form_state) { $form['email_password_reset'] = array( '#type' => 'details', '#title' => $this->t('Password recovery'), - '#collapsed' => TRUE, '#description' => $this->t('Edit the e-mail messages sent to users who request a new password.') . ' ' . $email_token_help, '#group' => 'email', '#weight' => 10, @@ -282,7 +286,6 @@ public function buildForm(array $form, array &$form_state) { $form['email_activated'] = array( '#type' => 'details', '#title' => $this->t('Account activation'), - '#collapsed' => TRUE, '#description' => $this->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', ); @@ -316,7 +319,6 @@ public function buildForm(array $form, array &$form_state) { $form['email_blocked'] = array( '#type' => 'details', '#title' => $this->t('Account blocked'), - '#collapsed' => TRUE, '#description' => $this->t('Enable and edit e-mail messages sent to users when their accounts are blocked.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -350,7 +352,6 @@ public function buildForm(array $form, array &$form_state) { $form['email_cancel_confirm'] = array( '#type' => 'details', '#title' => $this->t('Account cancellation confirmation'), - '#collapsed' => TRUE, '#description' => $this->t('Edit the e-mail messages sent to users when they attempt to cancel their accounts.') . ' ' . $email_token_help, '#group' => 'email', ); @@ -370,7 +371,6 @@ public function buildForm(array $form, array &$form_state) { $form['email_canceled'] = array( '#type' => 'details', '#title' => $this->t('Account canceled'), - '#collapsed' => TRUE, '#description' => $this->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 5912c76..8da0827 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -303,7 +303,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['admin_label'] = array( '#type' => 'details', '#title' => t('Administrative title'), - '#collapsed' => TRUE, '#weight' => 150, ); $form['admin_label']['admin_label'] = array( @@ -319,7 +318,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['more'] = array( '#type' => 'details', '#title' => t('More'), - '#collapsed' => TRUE, '#weight' => 200, ); // 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 a261315..8ec9d3d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php @@ -353,7 +353,6 @@ public function globalTokenForm(&$form, &$form_state) { $form['global_tokens'] = array( '#type' => 'details', '#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/argument/ArgumentPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php index 0b0f992..c30867d 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 @@ -176,6 +176,7 @@ public function buildOptionsForm(&$form, &$form_state) { $form['no_argument'] = array( '#type' => 'details', '#title' => $argument_text['filter value not present'], + '#open' => TRUE, ); // Everything in the details is floated, so the last element needs to // clear those floats. @@ -195,7 +196,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['exception'] = array( '#type' => 'details', '#title' => t('Exceptions'), - '#collapsed' => TRUE, '#fieldset' => 'no_argument', ); $form['exception']['value'] = array( @@ -241,6 +241,7 @@ public function buildOptionsForm(&$form, &$form_state) { $form['argument_present'] = array( '#type' => 'details', '#title' => $argument_text['filter value present'], + '#open' => TRUE, ); $form['title_enable'] = array( '#type' => 'checkbox', 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 25c28a8..23f7c85 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 @@ -536,7 +536,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['style_settings'] = array( '#type' => 'details', '#title' => t('Style settings'), - '#collapsed' => TRUE, '#weight' => 99, ); @@ -685,7 +684,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['alter'] = array( '#title' => t('Rewrite results'), '#type' => 'details', - '#collapsed' => TRUE, '#weight' => 100, ); @@ -886,7 +884,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( @@ -1025,7 +1022,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 1e6ab81..f794863 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 a9571d1..9efd1ce 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/lib/Drupal/views/Plugin/views/style/Table.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php index 121047a..7c1c80a 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php @@ -255,7 +255,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['accessibility_details'] = array( '#type' => 'details', '#title' => t('Table details'), - '#collapsed' => TRUE, ); $form['summary'] = array( diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/AdvancedSettingsForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/AdvancedSettingsForm.php index fd77d5e..5eebba1 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/AdvancedSettingsForm.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/AdvancedSettingsForm.php @@ -31,6 +31,7 @@ public function buildForm(array $form, array &$form_state) { $form['cache'] = array( '#type' => 'details', '#title' => $this->t('Caching'), + '#open' => TRUE, ); $form['cache']['skip_cache'] = array( @@ -49,6 +50,7 @@ public function buildForm(array $form, array &$form_state) { $form['debug'] = array( '#type' => 'details', '#title' => $this->t('Debugging'), + '#open' => TRUE, ); $form['debug']['sql_signature'] = array( diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php index d1206d5..0518a07 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php @@ -70,6 +70,7 @@ public function buildForm(array $form, array &$form_state) { $form['live_preview'] = array( '#type' => 'details', '#title' => $this->t('Live preview settings'), + '#open' => TRUE, ); $form['live_preview']['ui_always_live_preview'] = array( 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 09f178d..9c283cb 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -490,7 +490,6 @@ public function getDisplayDetails($view, $display) { $build['columns']['third'] = array( '#type' => 'details', '#title' => $this->t('Advanced'), - '#collapsed' => TRUE, '#theme_wrappers' => array('details'), '#attributes' => array( 'class' => array( @@ -501,9 +500,7 @@ public function getDisplayDetails($view, $display) { ); // Collapse the details by default. - if (\Drupal::config('views.settings')->get('ui.show.advanced_column')) { - $build['columns']['third']['#collapsed'] = FALSE; - } + $build['columns']['third']['#open'] = \Drupal::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 db92c1a..c15b9fc 100644 --- a/core/update.php +++ b/core/update.php @@ -70,7 +70,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.