diff --git a/core/includes/form.inc b/core/includes/form.inc index b5a22a474a4ee5c4b077a45af02bbd438e107a82..454a01670bfb3f797b79c23aa32da97d7dc4a2cd 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -1004,7 +1004,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 @@ -1071,7 +1071,7 @@ function theme_fieldset($variables) { * @param array $variables * An associative array containing: * - element: An associative array containing the properties of the element. - * Properties used: #attributes, #children, #collapsed, #collapsible, + * Properties used: #attributes, #children, #open, * #description, #id, #title, #value, #optional. * * @ingroup themeable @@ -1085,7 +1085,7 @@ function template_preprocess_details(&$variables) { if (!empty($element['#attributes']['id'])) { $variables['summary_attributes']['aria-controls'] = $element['#attributes']['id']; } - $variables['summary_attributes']['aria-expanded'] = empty($element['#attributes']['open']) ? FALSE : TRUE; + $variables['summary_attributes']['aria-expanded'] = !empty($element['#attributes']['open']); $variables['summary_attributes']['aria-pressed'] = $variables['summary_attributes']['aria-expanded']; } $variables['title'] = (!empty($element['#title'])) ? $element['#title'] : ''; @@ -2063,7 +2063,7 @@ function form_pre_render_details($element) { // Collapsible details. $element['#attached']['library'][] = array('core', 'drupal.collapse'); - if (empty($element['#collapsed'])) { + if (!empty($element['#open'])) { $element['#attributes']['open'] = 'open'; } diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php index 0f66af66e99f0a7c8cb8441f4bc0c5c33e657197..41ba2db86a070fd6291ba2529effc7e216c7bcf5 100644 --- a/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -247,7 +247,6 @@ public function getFormOptions(array $database) { $form['advanced_options'] = array( '#type' => 'details', '#title' => t('Advanced options'), - '#collapsed' => TRUE, '#weight' => 10, ); diff --git a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php index fae7d5bc6c74e6631b448df6330e1bd20a44343b..415e9ff609b1399fc51fd3bb6f12b87b8d545a2b 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/lib/Drupal/Core/Update/Form/UpdateScriptSelectionForm.php b/core/lib/Drupal/Core/Update/Form/UpdateScriptSelectionForm.php index ce01146dff35d7c07d44a7e31f50ae834bb42620..b6d440d8152931b49f73efebe932f8cd80e62aa6 100644 --- a/core/lib/Drupal/Core/Update/Form/UpdateScriptSelectionForm.php +++ b/core/lib/Drupal/Core/Update/Form/UpdateScriptSelectionForm.php @@ -30,7 +30,6 @@ public function buildForm(array $form, array &$form_state) { $form['start'] = array( '#tree' => TRUE, '#type' => 'details', - '#collapsed' => TRUE, ); // Ensure system.module's updates appear first. diff --git a/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php b/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php index e44a7f888dd949b4c5270b14f1f22b4a62af48a6..fd1a0d0213eb8edfd16db6d62c6767e32dbbdba9 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 8470858b8803420d4041050b627e0b974eaa0f3b..29376bc2267d6118c2923d6d94cefb3626faee43 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php @@ -145,7 +145,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 895944ef3906bc94198e24804cfddf17f76244f2..3b892367b755acf2af17b1434f337fabf247c30d 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 @@ -83,7 +83,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 0f9c83e593bfa39a36e168fefe53b7697835f918..97e47b872babb69b1bb1b7ffcc3cff275aea9eb4 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 @@ -74,7 +74,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 e67b35430cb7940a4f9ff0208625169c4009cbb0..4ad8ba9503af992f40afcaf24ca14946f50158dc 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 @@ -134,9 +134,8 @@ public function form(array $form, array &$form_state) { $form['revision_information'] = array( '#type' => 'details', '#title' => $this->t('Revision information'), - '#collapsible' => TRUE, - // Collapsed by default when "Create new revision" is unchecked. - '#collapsed' => !$block->isNewRevision(), + // Open by default when "Create new revision" is checked. + '#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 d2ab3760c2fd35601410647aa5aea78d61dc6b3d..10dea1c51306cc89a71cfaf2ccb0976630acbf4e 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 3419afc71525e4bb958580ccf415183469cf1ed1..b70575df54c1bce27d4eeef61462c762ee9ac4bc 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php @@ -127,7 +127,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, ); @@ -183,7 +182,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, ); @@ -216,7 +214,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 f66883c54d23d87c5a66cdfed76f3d33c1d2265b..413054ccedf1d407e299a059db3c32fca436948e 100644 --- a/core/modules/block/lib/Drupal/block/BlockListController.php +++ b/core/modules/block/lib/Drupal/block/BlockListController.php @@ -348,6 +348,7 @@ public function buildForm(array $form, array &$form_state) { $form['place_blocks']['list'][$category_key] = 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 601717b6264cf20131b28738085347f5f53449d5..8f3162c1f6d46cea5900cbebe5afb681bc882336 100644 --- a/core/modules/book/lib/Drupal/book/BookManager.php +++ b/core/modules/book/lib/Drupal/book/BookManager.php @@ -201,7 +201,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 38a3ec69c1bb0aea0c90459ed35e7957356da0e9..ffd401b27d8ce4df5efa33d5fcb0802534c771dc 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php @@ -156,6 +156,7 @@ public function injectPluginSettingsForm(array &$form, array &$form_state, Edito $form['plugins'][$plugin_id] = array( '#type' => 'details', '#title' => $definitions[$plugin_id]['label'], + '#open' => TRUE, '#group' => 'editor][settings][plugin_settings', '#attributes' => array( 'data-ckeditor-plugin-id' => $plugin_id, diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 4aa5b74f0914f8014625c115755f5be9d046d52c..5fc1532bc1420ae8f168a298d1704e7d0ddea16f 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -45,6 +45,7 @@ function color_form_system_theme_settings_alter(&$form, &$form_state) { $form['color'] = array( '#type' => 'details', '#title' => t('Color scheme'), + '#open' => TRUE, '#weight' => -1, '#attributes' => array('id' => 'color_scheme_form'), '#theme' => 'color_scheme_form', diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php index 9911726f99c8bdf7e0e60dca967a1ef9bfa20b31..a3daab61e1294d1ef0a9b6537d0ef7c87526f2cd 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php @@ -118,7 +118,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/Form/CommentAdminOverview.php b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php index 3f5caefb27257db665ee85371fcfe10e32489f89..5fed1dbd5d09541d30dfd45514461ffeb58cfcb1 100644 --- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php +++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php @@ -119,6 +119,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') { $form['options'] = array( '#type' => 'details', '#title' => $this->t('Update options'), + '#open' => TRUE, '#attributes' => array('class' => array('container-inline')), ); diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php index ae4f4cb4e749481bdb63254d65d1c2fdfa0eee37..b50bafc72f59021e1ab00802497ce9a817501f6a 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php @@ -92,8 +92,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/FieldWidget/CommentWidget.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldWidget/CommentWidget.php index fd4ece70074901160f60944e923e6e29662efaed..1ee47666ab42bb3554ad2a9da5869c4eab0ca706 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldWidget/CommentWidget.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldWidget/CommentWidget.php @@ -68,9 +68,9 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen if (isset($form['advanced'])) { $element += array( '#type' => 'details', - // Collapse this field when the selected value is the same as stored in + // Open the details when the selected value is different to the stored // 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/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php index 5948f7a40f31f1e83a8ebaa9c4251d3112e8daa5..8e966eb489cfddf4a787c592ee707091b8611530 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php @@ -293,8 +293,7 @@ protected function buildConfigForm(Element $schema, $config_data, $base_config_d $build[$key] = array( '#type' => 'details', '#title' => (!empty($title) ? (strip_tags($title) . ' ') : '') . $this->t($definition['label']), - '#collapsible' => TRUE, - '#collapsed' => $collapsed, + '#open' => !$collapsed, ) + $sub_build; } } diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 0a366cb171279a5982f7b99fb285a049ac5e6677..fe9079990f75a38d6b0a8afd990963786646cbee 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -224,6 +224,7 @@ function contact_form_user_form_alter(&$form, &$form_state) { $form['contact'] = array( '#type' => 'details', '#title' => t('Contact settings'), + '#open' => TRUE, '#weight' => 5, ); $account = $form_state['controller']->getEntity(); @@ -258,6 +259,7 @@ function contact_form_user_admin_settings_alter(&$form, &$form_state) { $form['contact'] = array( '#type' => 'details', '#title' => t('Contact settings'), + '#open' => TRUE, '#weight' => 0, ); $form['contact']['contact_default_status'] = array( 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 497b01c7874fa4611ba56c1bd54b759dc664be55..4fc6c1ec6beac0ffbc63362681be605df63b6dd3 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php @@ -112,7 +112,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, @@ -182,7 +181,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/lib/Drupal/dblog/Form/DblogClearLogForm.php b/core/modules/dblog/lib/Drupal/dblog/Form/DblogClearLogForm.php index ebdfb8f30c1463793c60cfa2b81e329137f54d1b..439148a0830295973213256242d50c77c2e88873 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Form/DblogClearLogForm.php +++ b/core/modules/dblog/lib/Drupal/dblog/Form/DblogClearLogForm.php @@ -57,7 +57,6 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#title' => $this->t('Clear log messages'), '#description' => $this->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/dblog/lib/Drupal/dblog/Form/DblogFilterForm.php b/core/modules/dblog/lib/Drupal/dblog/Form/DblogFilterForm.php index 89eeba7c70e0695a64f1b0fbfc64b60a80c3ac1f..2422472e5d2d7171bc0b334e98ed2b6fa89489d7 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Form/DblogFilterForm.php +++ b/core/modules/dblog/lib/Drupal/dblog/Form/DblogFilterForm.php @@ -30,7 +30,7 @@ public function buildForm(array $form, array &$form_state) { $form['filters'] = array( '#type' => 'details', '#title' => $this->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( diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php index f9643b0f9e0b0420b8176dd952fd450c78a060f0..b801c1e5d4c1198069addd5781a89ff6db354a43 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php @@ -186,6 +186,7 @@ public function instanceSettingsForm(array $form, array &$form_state) { $form['handler'] = array( '#type' => 'details', '#title' => t('Reference type'), + '#open' => TRUE, '#tree' => TRUE, '#process' => array('_entity_reference_form_process_merge_parent'), ); 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 7394c3fb1c200febe0ce1f4f7e163c68bf86ef39..b5a9fa93d0c27fa1c4affe89ac69818ab54782c3 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 @@ -478,7 +478,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 2d6a96bf2a1cf79c15adad7c2d98423efbc11a32..824cbfc69616fabbf022fb8c7df2fb93e2dd469c 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 @@ -60,6 +60,7 @@ function field_test_entity_nested_form($form, &$form_state, EntityInterface $ent $form['entity_2'] = array( '#type' => 'details', '#title' => t('Second entity'), + '#open' => TRUE, '#tree' => TRUE, '#parents' => array('entity_2'), '#weight' => 50, 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 2ed54e87000bc47af392465661756e4872f271e2..5323e4ef474db47cd1273f43e5cdc4afce1f26f8 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php @@ -186,7 +186,6 @@ public function buildForm(array $form, array &$form_state, $entity_type_id = NUL $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 8cfd335d316582fec5f0cd6ef06ed98a6c996d79..9c4de60f7c85642b0272e2958c3126e96ea516e0 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 @@ -142,6 +142,7 @@ public function buildForm(array $form, array &$form_state, FieldInstanceConfigIn $element += array( '#type' => 'details', '#title' => $this->t('Default value'), + '#open' => TRUE, '#description' => $this->t('The default value for this field, used when creating new content.'), ); $form['instance']['default_value'] = $element; diff --git a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldWidget/FileWidget.php index 5c976ed5f8fc7ac21eb28b2f9437c786f2df9aa0..9267eae4eb75b081d3fe22d2bf6f82f2cf2495de 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldWidget/FileWidget.php @@ -145,6 +145,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(array(get_class($this), 'processMultiple')); diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php index eae21c21c6c0a4809c46d0c70b3e31c9b59269db..6fa194c1aa3799719302eed450a5022201587d8b 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php @@ -190,6 +190,7 @@ public function form(array $form, array &$form_state) { $form['filters']['settings'][$name] = array( '#type' => 'details', '#title' => $filter->getLabel(), + '#open' => TRUE, '#weight' => $filter->weight, '#parents' => array('filters', $name, 'settings'), '#group' => 'filter_settings', diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php index 0455b7da1867d1f3073d4df5dc457e88a0440097..8bbf24708627bbbefc942946f7ab9af4f60815e0 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php @@ -107,7 +107,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 172e6b0ab0ea8bb63ce3413eed0b5b96ea68e709..6f9cdf5236cbf64a51d3f0980f62771dd44f462c 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. <strong>Modifying this value may break existing URLs. Use with caution in a production environment.</strong> Example: Specifying "deutsch" as the path prefix code for German results in URLs like "example.com/deutsch/contact".'), '#states' => array( 'visible' => array( @@ -56,6 +57,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'details', '#tree' => TRUE, '#title' => t('Domain configuration'), + '#open' => TRUE, '#description' => t('The domain names to use for these languages. Leave blank for the default language. Use with caution in a production environment.<strong>Modifying this value may break existing URLs. Use with caution in a production environment.</strong> Example: Specifying "de.example.com" as language domain for German will result in an URL like "http://de.example.com/contact".'), '#states' => array( 'visible' => array( diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php index 9018755a1d54bc55d05ca1c5b887741e3245300f..2fd6ad6f08b6339642aa6a3bb885141ad02f60ce 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 bb8da4076b97434fa85048fa3a0cfec3a6c01145..96cf924fc352b2cd138f64e25bc9dc8933513c34 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -190,7 +190,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 9a7d93bed517c7eed8451509d2ea2f4fc4710192..c054484311b8f324adf742ef7b0fee0273aa3410 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 15e02ab24ed287ddf933eb129450051ac1793b68..df50185c8014af6aaf1703a8b6a3747118ee8e7c 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -474,7 +474,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' => !empty($link['link_title']), '#group' => 'advanced', '#attached' => array( 'library' => array(array('menu', 'drupal.menu')), @@ -593,7 +593,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 569f5020c72b658596bdb7339d4e9c39e23c8ab0..24fa5b9c7c97601349695ebc9d5ee8b717f4a997 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -108,8 +108,8 @@ public function form(array $form, array &$form_state) { '#type' => 'details', '#group' => 'advanced', '#title' => t('Revision information'), - // Collapsed by default when "Create new revision" is unchecked. - '#collapsed' => !$node->isNewRevision(), + // Open by default when "Create new revision" is checked. + '#open' => $node->isNewRevision(), '#attributes' => array( 'class' => array('node-form-revision-information'), ), @@ -147,7 +147,6 @@ public function form(array $form, array &$form_state) { $form['author'] = array( '#type' => 'details', '#title' => t('Authoring information'), - '#collapsed' => TRUE, '#group' => 'advanced', '#attributes' => array( 'class' => array('node-form-author'), @@ -190,7 +189,6 @@ public function form(array $form, array &$form_state) { $form['options'] = array( '#type' => 'details', '#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 cc8609537ba1136197aa984983dd3a84b9633b45..e0a466c11281fd05a603490416801723b798b213 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeFormController.php @@ -74,6 +74,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'), @@ -108,7 +109,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', @@ -127,7 +127,6 @@ public function form(array $form, array &$form_state) { $form['language'] = array( '#type' => 'details', '#title' => t('Language settings'), - '#collapsed' => TRUE, '#group' => 'additional_settings', ); @@ -144,7 +143,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 1e9e7ffca1c715aae08f32a77adb53429bdc89be..6106729ab51d91e6e20223bab8c2f884d82d5de5 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Search/NodeSearch.php @@ -379,14 +379,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' => '<div class="criterion">', @@ -416,7 +414,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', @@ -443,8 +440,6 @@ public function searchFormAlter(array &$form, array &$form_state) { $form['advanced']['lang-fieldset'] = array( '#type' => 'fieldset', '#title' => t('Languages'), - '#collapsible' => FALSE, - '#collapsed' => FALSE, ); $form['advanced']['lang-fieldset']['language'] = array( '#type' => 'checkboxes', @@ -556,6 +551,7 @@ public function buildConfigurationForm(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 a38d788af06a71c610505ee51f5268b996e109b1..bb851a5b60ce261a6b0a84b792734e087ea0339a 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -1070,7 +1070,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 fe8d542e03233986800ade6751ab687dd3820a41..a2b20722fd063f53de6b955a08f3ae7232e2d3d4 100644 --- a/core/modules/path/path.admin.inc +++ b/core/modules/path/path.admin.inc @@ -283,8 +283,10 @@ 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'), + '#open' => TRUE, '#attributes' => array('class' => array('container-inline')), ); $form['basic']['filter'] = array( diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 10816eecbe79abc42459cc4701f46751a6aa6b3e..b2ad95cfd598f96edb5e161f2fe9a37ef51f851a 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -97,7 +97,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/SearchPageListController.php b/core/modules/search/lib/Drupal/search/SearchPageListController.php index 6d4edc33335d8f9ff9bfb6f3f33770f2fa2eba21..fbbe6bb09bc3741a91012fd4cf72bc1ff29c0485 100644 --- a/core/modules/search/lib/Drupal/search/SearchPageListController.php +++ b/core/modules/search/lib/Drupal/search/SearchPageListController.php @@ -158,6 +158,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( @@ -171,7 +172,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', @@ -183,7 +185,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('<p><em>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.</em></p><p><em>The default settings should be appropriate for the majority of sites.</em></p>') @@ -206,6 +209,7 @@ public function buildForm(array $form, array &$form_state) { $form['search_pages'] = array( '#type' => 'details', '#title' => $this->t('Search pages'), + '#open' => TRUE, ); $form['search_pages']['add_page'] = array( '#type' => 'container', diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php index a1664228417e2f9c1abd2ce06972774e2092db6b..8b74dc5677e4949b0c23a965f75f11be93302ec1 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestResultsForm.php @@ -145,6 +145,7 @@ public function buildForm(array $form, array &$form_state, $test_id = NULL) { $form['result']['results'][$group] = array( '#type' => 'details', '#title' => $info['name'], + '#open' => TRUE, '#description' => $info['description'], ); $form['result']['results'][$group]['summary'] = $summary; @@ -178,7 +179,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 24bdb85815fb7210380cf5e1af48b04785e77f7f..dfd80a1091a42efab699cc2d806cf59f28102433 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 c469b52a39d102c2ed31ad617013f6fe9f9d8545..acef8285442b1654eb69ae59c3d853545d17d628 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Form/SimpletestTestForm.php @@ -48,6 +48,7 @@ public function buildForm(array $form, array &$form_state) { $form['tests'] = array( '#type' => 'details', '#title' => $this->t('Tests'), + '#open' => TRUE, '#description' => $this->t('Select the test(s) or test group(s) you would like to run, and click <em>Run tests</em>.'), ); @@ -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 1743b742ce25cd51eaeec10f0e0752ee341bbade..59fed66166429e4925631836a77438e09299c25e 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 2f4d9f75a28c068b7203dd97c019195bb8a71809..d4683a90369415210247b6f110e3437e377e898a 100644 --- a/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php +++ b/core/modules/statistics/lib/Drupal/statistics/StatisticsSettingsForm.php @@ -64,6 +64,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 ac5789d83f873520d1c7cf74d6c096f4511a47ab..f32a4638ad0b73dbd381d6b2d824608bf7220e85 100644 --- a/core/modules/system/lib/Drupal/system/Form/CronForm.php +++ b/core/modules/system/lib/Drupal/system/Form/CronForm.php @@ -94,6 +94,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 dca33b4c1b71aa20a1fd53869382e4b966d93e58..e28e64727445179c147afb53163eba91449ced55 100644 --- a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php @@ -78,7 +78,7 @@ public function buildForm(array $form, array &$form_state) { $form['image_toolkit_settings'][$id] = array( '#type' => 'details', '#title' => $this->t('@toolkit settings', array('@toolkit' => $definition['title'])), - '#collapsed' => FALSE, + '#open' => TRUE, '#tree' => TRUE, '#states' => array( 'visible' => array( diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php index 704a078ee1be41a8babdc6cf893c9a7c3cf69611..15d5eafedda1203b5f1658d1b85f92d700d9b1e3 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesListForm.php @@ -145,6 +145,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' => '<span class="visually-hidden">' . $this->t('Installed') . '</span>', '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 3f441280373ac731db24e7774611be509a1bb48a..a123d8b54fbea279b7accfd529e188c2f7175723 100644 --- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php +++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php @@ -65,6 +65,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( @@ -76,6 +77,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'); @@ -106,6 +108,7 @@ public function buildForm(array $form, array &$form_state) { $form['bandwidth_optimization'] = array( '#type' => 'details', '#title' => t('Bandwidth optimization'), + '#open' => TRUE, '#description' => t('External resources can be optimized automatically, which can reduce both the size and number of requests made to your website.') . $disabled_message, ); diff --git a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php index 1c45f15667aa1992af638530b0f8a432ea84e075..bf4ebaf26dfd168e898e698fd07f70b694e4136f 100644 --- a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php +++ b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php @@ -67,6 +67,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( @@ -88,6 +89,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 6f433ee80b27868e80dd63cb1c34cb9bf2130de8..1a10aaa74509e95e946bb7f5db13cc57c5fc2282 100644 --- a/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php +++ b/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php @@ -68,6 +68,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', @@ -91,6 +92,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( @@ -104,6 +106,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/ThemeAdminForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeAdminForm.php index 8bb44ef7d3a059ea86a3d64a4e8a8ee9b692eca2..81aebc7daeecfc94114f9907e2c998eb111a5ba3 100644 --- a/core/modules/system/lib/Drupal/system/Form/ThemeAdminForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ThemeAdminForm.php @@ -30,6 +30,7 @@ public function buildForm(array $form, array &$form_state, array $theme_options $form['admin_theme'] = array( '#type' => 'details', '#title' => $this->t('Administration theme'), + '#open' => TRUE, ); $form['admin_theme']['admin_theme'] = array( '#type' => 'select', diff --git a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php index 5dbbea1fe28b494a794469820daa8673a05cf6ce..2f910ae02be6b8309674f59e34790f362db81305 100644 --- a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php @@ -122,6 +122,7 @@ public function buildForm(array $form, array &$form_state, $theme = '') { $form['theme_settings'] = array( '#type' => 'details', '#title' => t('Toggle display'), + '#open' => TRUE, '#description' => t('Enable or disable the display of certain page elements.'), ); foreach ($toggles as $name => $title) { @@ -145,6 +146,7 @@ public function buildForm(array $form, array &$form_state, $theme = '') { $form['logo'] = array( '#type' => 'details', '#title' => t('Logo image settings'), + '#open' => TRUE, '#attributes' => array('class' => array('theme-settings-bottom')), '#states' => array( // Hide the logo image settings fieldset when logo display is disabled. @@ -185,6 +187,7 @@ public function buildForm(array $form, array &$form_state, $theme = '') { $form['favicon'] = array( '#type' => 'details', '#title' => t('Shortcut icon settings'), + '#open' => TRUE, '#description' => t("Your shortcut icon, or 'favicon', is displayed in the address bar and bookmarks of most browsers."), '#states' => array( // Hide the shortcut icon settings fieldset when shortcut icon display @@ -261,6 +264,7 @@ public function buildForm(array $form, array &$form_state, $theme = '') { $form['engine_specific'] = array( '#type' => 'details', '#title' => t('Theme-engine-specific settings'), + '#open' => TRUE, '#description' => t('These settings only exist for the themes based on the %engine theme engine.', array('%engine' => $themes[$theme]->prefix)), ); $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 b1d4ca9ae1a60b2c689d0c5547664f686b0140fe..0eec221ef600578e44b2e89d9fb9f5b1f525c6ce 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php @@ -345,6 +345,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'), ), @@ -353,6 +354,7 @@ function testDrupalRenderChildrenAttached() { ); $element['child'] = array( '#type' => 'details', + '#open' => TRUE, '#attached' => array('js' => array($child_js)), '#title' => 'Child', ); @@ -558,6 +560,7 @@ function testDrupalRenderChildrenPostRenderCache() { $context_3 = array('baz' => $this->randomContextValue()); $test_element = array( '#type' => 'details', + '#open' => TRUE, '#cache' => array( 'keys' => array('simpletest', 'drupal_render', 'children_post_render_cache'), ), @@ -573,6 +576,7 @@ function testDrupalRenderChildrenPostRenderCache() { ); $test_element['child'] = array( '#type' => 'details', + '#open' => TRUE, '#post_render_cache' => array( 'common_test_post_render_cache' => array($context_2) ), diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderWebTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderWebTest.php index c42997de6f6cb37b2f0b5c2f05d8776b449e812b..8168b9633bdb8778b4136d5f7c4189a74a59a3a1 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderWebTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderWebTest.php @@ -122,6 +122,7 @@ function testDrupalRenderFormElements() { $element = array( '#type' => 'details', + '#open' => TRUE, '#title' => $this->randomName(), ); $this->assertRenderedElement($element, '//details/summary[contains(., :title)]', array( @@ -130,6 +131,7 @@ function testDrupalRenderFormElements() { $element = array( '#type' => 'details', + '#open' => TRUE, '#title' => $this->randomName(), ); $this->assertRenderedElement($element, '//details'); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 6cdef505e9ecfbfae67be4b4635f0e764864c960..ebcf07cc0f00082d3ddfd697fc3a1283cfe69523 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -391,7 +391,6 @@ function theme_system_modules_details($variables) { '#title' => '<span class="text"> ' . drupal_render($module['description']) . '</span>', '#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 71d0679b38354abe7a6b1b80123095fdfa2730e7..2580688af3ff22d4f1ebf0b14f80b2f837f63276 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -557,7 +557,7 @@ function system_element_info() { '#attributes' => array('class' => array('fieldgroup')), ); $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'), @@ -1391,6 +1391,7 @@ function system_user_timezone(&$form, &$form_state) { $form['timezone'] = array( '#type' => 'details', '#title' => t('Locale settings'), + '#open' => TRUE, '#weight' => 6, ); $form['timezone']['timezone'] = array( 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 0e8bdb9581ed62c18aed509b379eaae822bcef26..e80170829e6521c38e169aeb38b132567a50d4a8 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -527,7 +527,7 @@ 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'), ); $form['tab1']['field1'] = array( '#title' => t('Field 1'), @@ -537,7 +537,7 @@ 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'), ); $form['tab2']['field2'] = array( '#title' => t('Field 2'), @@ -2054,10 +2054,12 @@ function form_test_group_details() { $form['details'] = array( '#type' => 'details', '#title' => 'Root element', + '#open' => TRUE, ); $form['meta'] = array( '#type' => 'details', '#title' => 'Group element', + '#open' => TRUE, '#group' => 'details', ); $form['meta']['element'] = array( @@ -2079,6 +2081,7 @@ function form_test_group_container() { $form['meta'] = array( '#type' => 'details', '#title' => 'Group element', + '#open' => TRUE, '#group' => 'container', ); $form['meta']['element'] = array( diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index 3fa15e2703c9b28f0aad6a246fe1b1094c2d02d9..52ef2a86cde9de23cf3a2d58e1bef2c2994ecfe7 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -89,7 +89,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 6a02f1e7badf52a40d51f84594196b2e052513e5..724697044d4b5f2d881626e9f14dfe1a1a8aa745 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php @@ -58,6 +58,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/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index 6fa3732fe5f7c188c3febd28dcb97ebdf245f473..964c6642ae020a8cd03bc75c3a4d71c966f50abb 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -214,6 +214,7 @@ public function form(array $form, array &$form_state) { $form['signature_settings'] = array( '#type' => 'details', '#title' => $this->t('Signature settings'), + '#open' => TRUE, '#weight' => 1, '#access' => (!$register && $config->get('signatures')), ); @@ -245,6 +246,7 @@ public function form(array $form, array &$form_state) { $form['language'] = array( '#type' => $this->languageManager->isMultilingual() ? 'details' : 'container', '#title' => $this->t('Language settings'), + '#open' => TRUE, // Display language selector when either creating a user on the admin // interface or editing a user account. '#access' => !$register || $user->hasPermission('administer users'), diff --git a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php index b7c4c3a66f53770505964aff39680d2231795063..cc4e2557f29e5f3779c535fd66fd8c70423ab208 100644 --- a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php +++ b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php @@ -66,6 +66,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', @@ -79,6 +80,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. @@ -98,6 +100,7 @@ public function buildForm(array $form, array &$form_state) { $form['language'] = array( '#type' => 'details', '#title' => $this->t('Language settings'), + '#open' => TRUE, '#tree' => TRUE, ); $form_state['content_translation']['key'] = 'language'; @@ -108,6 +111,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', @@ -151,6 +155,7 @@ public function buildForm(array $form, array &$form_state) { $form['personalization'] = array( '#type' => 'details', '#title' => $this->t('Personalization'), + '#open' => TRUE, '#access' => $filter_exists, ); $form['personalization']['user_signatures'] = array( @@ -180,7 +185,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', ); @@ -200,7 +205,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', ); @@ -220,7 +225,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', ); @@ -240,7 +245,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', ); @@ -260,7 +265,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, @@ -281,7 +285,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', ); @@ -315,7 +318,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', ); @@ -349,7 +351,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', ); @@ -369,7 +370,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 e319ab18c08f161142b9960e5b66aa276e93e050..24ae8f7ef3093675834fb27a47677bfa708cd99a 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -294,7 +294,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( @@ -310,7 +309,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 087c9abaf733470306618dc115805ea4f92405d1..aaae02210b46a809c4fdc0cfc7a89ce3aaa615d4 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php @@ -354,7 +354,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 fc6870349d257427cca048306cfa0390ee57d816..be1a69cc8c4bb51ef9fdca8711944a8c6f84f201 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 @@ -156,6 +156,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. @@ -175,7 +176,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['exception'] = array( '#type' => 'details', '#title' => t('Exceptions'), - '#collapsed' => TRUE, '#fieldset' => 'no_argument', ); $form['exception']['value'] = array( @@ -221,6 +221,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 5f66de4db4ef7c591baf30f56ad78868d3fde52f..08c12cc64f5e30a0308fca1b664bf82d208cbd79 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 @@ -538,7 +538,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['style_settings'] = array( '#type' => 'details', '#title' => t('Style settings'), - '#collapsed' => TRUE, '#weight' => 99, ); @@ -687,7 +686,6 @@ public function buildOptionsForm(&$form, &$form_state) { $form['alter'] = array( '#title' => t('Rewrite results'), '#type' => 'details', - '#collapsed' => TRUE, '#weight' => 100, ); @@ -890,7 +888,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( @@ -1029,7 +1026,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 c81841efcdb15ca022651a4420c016c2c1a90910..a0c1c3d92e1820fcf85a058b57a6e30707e770ea 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 00d371db3f94075c830a9576a74aa277f56e56a4..b59b72e3eee8e62f334411bd5d63fad99b229296 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 @@ -89,7 +89,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 d6e6e7a0adaa508c293e100ef4b3f83b5d6f36c8..25686f8670e29df3eb128ad0009280b13798cfa2 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 @@ -253,7 +253,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 37300053e98a78a14b8b812f5238568a4eba47b0..daaee7017b8aa866ce484c1fa0a7fdff30e76a28 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( @@ -70,6 +72,7 @@ public function buildForm(array $form, array &$form_state) { if (!empty($options)) { $form['extenders'] = array( '#type' => 'details', + '#open' => TRUE, ); $form['extenders']['display_extenders'] = array( '#title' => $this->t('Display extenders'), 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 e471528dc9ebdf23e52ee86d55a0d577c376a54f..caade6eb58156cd05323aaf042a81f05ee9b6cbf 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 @@ -68,6 +68,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 3c803d8459f1e21482ac86a0999e0f4a8133e3c6..0373116d63de9e24f84af5ab1d4301cef27d5381 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -501,7 +501,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( @@ -510,11 +509,8 @@ 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).