diff --git a/core/includes/authorize.inc b/core/includes/authorize.inc index f98820f..251ce11 100644 --- a/core/includes/authorize.inc +++ b/core/includes/authorize.inc @@ -158,7 +158,7 @@ function _authorize_filetransfer_connection_settings($backend) { * * The default settings for the file transfer connection forms are saved in * the database. The settings are stored as a nested array in the case of a - * settings form that has fieldsets or otherwise uses a nested structure. + * settings form that has details or otherwise uses a nested structure. * Therefore, to properly add defaults, we need to walk through all the * children form elements and process those defaults recursively. * @@ -170,14 +170,14 @@ function _authorize_filetransfer_connection_settings($backend) { * The default settings for the file transfer backend we're operating on. */ function _authorize_filetransfer_connection_settings_set_defaults(&$element, $key, array $defaults) { - // If we're operating on a form element which isn't a fieldset, and we have + // If we're operating on a form element which isn't a details, and we have // a default setting saved, stash it in #default_value. - if (!empty($key) && isset($defaults[$key]) && isset($element['#type']) && $element['#type'] != 'fieldset') { + if (!empty($key) && isset($defaults[$key]) && isset($element['#type']) && $element['#type'] != 'details') { $element['#default_value'] = $defaults[$key]; } // Now, we walk through all the child elements, and recursively invoke // ourself on each one. Since the $defaults settings array can be nested - // (because of #tree, any values inside fieldsets will be nested), if + // (because of #tree, any values inside details will be nested), if // there's a subarray of settings for the form key we're currently // processing, pass in that subarray to the recursive call. Otherwise, just // pass on the whole $defaults array. diff --git a/core/includes/common.inc b/core/includes/common.inc index 6800fa5..a292d17 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -5573,8 +5573,8 @@ function drupal_render_page($page) { * * The #theme_wrappers property contains an array of theme functions which will * be called, in order, after #theme has run. These can be used to add further - * markup around the rendered children; e.g., fieldsets add the required markup - * for a fieldset around their rendered child elements. All wrapper theme + * markup around the rendered children; e.g., details add the required markup + * for a details element around their rendered child elements. All wrapper theme * functions have to include the element's #children property in their output, * as it contains the output of the previous theme functions and the rendered * children. diff --git a/core/includes/form.inc b/core/includes/form.inc index 34630f8..0784d2d 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -3703,23 +3703,6 @@ function form_validate_machine_name(&$element, &$form_state) { } /** - * Arranges fieldsets into groups. - * - * @param $element - * An associative array containing the properties and children of the - * fieldset. Note that $element must be taken by reference here, so processed - * child elements are taken over into $form_state. - * @param $form_state - * The $form_state array for the form this fieldset belongs to. - * - * @return - * The processed element. - */ -function form_process_fieldset(&$element, &$form_state) { - return form_process_details($element, $form_state); -} - -/** * Arranges details into groups. * * @param $element @@ -3742,8 +3725,6 @@ function form_process_details(&$element, &$form_state) { // Process vertical tabs group member details elements. if (isset($element['#group'])) { - // REMOVEME: Temporarily force vertical-tab fieldsets into details. - $element['#theme_wrappers'] = array('details'); // Add this details element to the defined group (by reference). $group = $element['#group']; $form_state['groups'][$group][] = &$element; @@ -3760,20 +3741,6 @@ function form_process_details(&$element, &$form_state) { * * @param $element * An associative array containing the properties and children of the - * fieldset. - * - * @return - * The modified element with all group members. - */ -function form_pre_render_fieldset($element) { - return form_pre_render_details($element); -} - -/** - * Adds members of this group as actual elements for rendering. - * - * @param $element - * An associative array containing the properties and children of the * details. * * @return diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 3968682..5da7bbf 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1875,7 +1875,7 @@ function install_check_requirements($install_state) { */ function _install_configure_form($form, &$form_state, &$install_state) { $form['site_information'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => st('Site information'), '#collapsible' => FALSE, ); @@ -1894,7 +1894,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { '#weight' => -15, ); $form['admin_account'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => st('Site maintenance account'), '#collapsible' => FALSE, ); @@ -1923,7 +1923,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { ); $form['server_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => st('Server settings'), '#collapsible' => FALSE, ); @@ -1950,7 +1950,7 @@ function _install_configure_form($form, &$form_state, &$install_state) { ); $form['update_notifications'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => st('Update notifications'), '#collapsible' => FALSE, ); diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php index 5d34a62..d7faaec 100644 --- a/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -232,7 +232,7 @@ public function getFormOptions($database) { ); $form['advanced_options'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => st('Advanced options'), '#collapsible' => TRUE, '#collapsed' => TRUE, diff --git a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php index 337b0b3..72a6751 100644 --- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php +++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php @@ -406,7 +406,7 @@ public function getSettingsForm() { '#description' => t('Your password is not saved in the database and is only used to establish a connection.'), ); $form['advanced'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Advanced settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, diff --git a/core/modules/action/action.admin.inc b/core/modules/action/action.admin.inc index f130111..c9db258 100644 --- a/core/modules/action/action.admin.inc +++ b/core/modules/action/action.admin.inc @@ -96,7 +96,7 @@ function action_admin_manage() { */ function action_admin_manage_form($form, &$form_state, $options = array()) { $form['parent'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Create an advanced action'), '#attributes' => array('class' => array('container-inline')), ); diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc index a859e85..9b9d2be 100644 --- a/core/modules/aggregator/aggregator.admin.inc +++ b/core/modules/aggregator/aggregator.admin.inc @@ -538,7 +538,7 @@ function aggregator_admin_form($form, $form_state) { } if (count($basic_conf)) { $form['basic_conf'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Basic configuration'), '#description' => t('For most aggregation tasks, the default settings are fine.'), '#collapsible' => TRUE, diff --git a/core/modules/aggregator/aggregator.processor.inc b/core/modules/aggregator/aggregator.processor.inc index b333a96..f00edc5 100644 --- a/core/modules/aggregator/aggregator.processor.inc +++ b/core/modules/aggregator/aggregator.processor.inc @@ -79,10 +79,10 @@ function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) { $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval'); $period[AGGREGATOR_CLEAR_NEVER] = t('Never'); - // Only wrap into a collapsible fieldset if there is a basic configuration. + // Only wrap into a collapsible details if there is a basic configuration. if (isset($form['basic_conf'])) { $form['modules']['aggregator'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Default processor settings'), '#description' => $info['description'], '#collapsible' => TRUE, diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc index 2a17a55..f632232 100644 --- a/core/modules/block/block.admin.inc +++ b/core/modules/block/block.admin.inc @@ -303,7 +303,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { // Region settings. $form['regions'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Region settings'), '#collapsible' => FALSE, '#description' => t('Specify in which themes and regions this block is displayed.'), @@ -355,7 +355,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { // Per-path visibility. $form['visibility']['path'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Pages'), '#collapsible' => TRUE, '#collapsed' => TRUE, @@ -429,7 +429,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { $langcodes_options[$language->langcode] = $language->name; } $form['visibility']['language'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Languages'), '#collapsible' => TRUE, '#collapsed' => TRUE, @@ -467,7 +467,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { ))->fetchCol(); $role_options = array_map('check_plain', user_roles()); $form['visibility']['role'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Roles'), '#collapsible' => TRUE, '#collapsed' => TRUE, @@ -484,7 +484,7 @@ function block_admin_configure($form, &$form_state, $module, $delta) { // Per-user visibility. $form['visibility']['user'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Users'), '#collapsible' => TRUE, '#collapsed' => TRUE, diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 2978146..e733525 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -611,10 +611,10 @@ function block_form_user_profile_form_alter(&$form, &$form_state) { ); } } - // Only display the fieldset if there are any personalizable blocks. + // Only display the form element if there are any personalizable blocks. if ($blocks) { $form['block'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Personalize blocks'), '#description' => t('Blocks consist of content or information that complements the main content of the page. Enable or disable optional blocks using the checkboxes below.'), '#weight' => 3, diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 7c43e28..e42bc88 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -419,7 +419,7 @@ function book_get_books() { /** * Implements hook_form_BASE_FORM_ID_alter() for node_form(). * - * Adds the book fieldset to the node form. + * Adds the book form element to the node form. * * @see book_pick_book_nojs_submit() */ @@ -535,7 +535,7 @@ function _book_add_form_elements(&$form, &$form_state, Node $node) { } $form['book'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Book outline'), '#weight' => 10, '#collapsible' => TRUE, diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 56c04cf..53a7f39 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -39,7 +39,7 @@ function color_theme() { function color_form_system_theme_settings_alter(&$form, &$form_state) { if (isset($form_state['build_info']['args'][0]) && ($theme = $form_state['build_info']['args'][0]) && color_get_info($theme) && function_exists('gd_info')) { $form['color'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Color scheme'), '#weight' => -1, '#attributes' => array('id' => 'color_scheme_form'), diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc index dcbd1bc..734dbf6 100644 --- a/core/modules/comment/comment.admin.inc +++ b/core/modules/comment/comment.admin.inc @@ -44,7 +44,7 @@ function comment_admin($type = 'new') { function comment_admin_overview($form, &$form_state, $arg) { // Build an 'Update options' form. $form['options'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Update options'), '#attributes' => array('class' => array('container-inline')), ); diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index df0a33a..19109c5 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1069,7 +1069,7 @@ function comment_view_multiple($comments, $view_mode = 'full', $langcode = NULL) function comment_form_node_type_form_alter(&$form, $form_state) { if (isset($form['type'])) { $form['comment'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Comment settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, @@ -1146,7 +1146,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) { function comment_form_node_form_alter(&$form, $form_state) { $node = $form_state['controller']->getEntity($form_state); $form['comment_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#access' => user_access('administer comments'), '#title' => t('Comment settings'), '#collapsible' => TRUE, diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php index cead0cd..7460f71 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php @@ -49,10 +49,10 @@ public function form(array $form, array &$form_state, EntityInterface $comment) $form['author'] = array( '#weight' => 10, ); - // Display author information in a fieldset for comment moderators. + // Display author information in a details element for comment moderators. if ($is_admin) { $form['author'] += array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Administration'), '#collapsible' => TRUE, '#collapsed' => TRUE, diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 1087308..f357e5a 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -304,7 +304,7 @@ function contact_mail($key, &$message, $params) { */ function contact_form_user_profile_form_alter(&$form, &$form_state) { $form['contact'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Contact settings'), '#weight' => 5, '#collapsible' => TRUE, @@ -334,7 +334,7 @@ function contact_user_presave($account) { */ function contact_form_user_admin_settings_alter(&$form, &$form_state) { $form['contact'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Contact settings'), '#weight' => 0, ); diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index 012d01e..faeac67 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -307,7 +307,7 @@ function dblog_filter_form($form) { $filters = dblog_filters(); $form['filters'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Filter log messages'), '#collapsible' => TRUE, '#collapsed' => empty($_SESSION['dblog_overview_filter']), @@ -384,7 +384,7 @@ function dblog_filter_form_submit($form, &$form_state) { */ function dblog_clear_log_form($form) { $form['dblog_clear'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Clear log messages'), '#description' => t('This will permanently remove the log messages from the database.'), '#collapsible' => TRUE, 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 4c5e5da..4f69b05 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 @@ -451,7 +451,7 @@ function multiple_options_form(&$form, &$form_state) { $field = $this->field_info; $form['multiple_field_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Multiple field settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, 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 fab06fa..1705391 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 @@ -311,7 +311,7 @@ function field_test_entity_nested_form($form, &$form_state, $entity_1, $entity_2 // Second entity. $form['entity_2'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Second entity'), '#tree' => TRUE, '#parents' => array('entity_2'), diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc index 7f58240..61a91d6 100644 --- a/core/modules/field_ui/field_ui.admin.inc +++ b/core/modules/field_ui/field_ui.admin.inc @@ -562,7 +562,7 @@ function field_ui_field_settings_form($form, &$form_state, $instance) { // Create a form structure for the field values. $form['field'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Field settings'), '#description' => $description, '#tree' => TRUE, @@ -656,7 +656,7 @@ function field_ui_widget_type_form($form, &$form_state, FieldInstance $instance) ); $form['basic'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Change widget'), ); $form['basic']['widget_type'] = array( @@ -815,15 +815,15 @@ function field_ui_field_edit_form($form, &$form_state, $instance) { // Create a form structure for the instance values. $form['instance'] = array( '#tree' => TRUE, - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('%type settings', array('%type' => $bundles[$entity_type][$bundle]['label'])), '#description' => t('These settings apply only to the %field field when used in the %type type.', array( '%field' => $instance['label'], '%type' => $bundles[$entity_type][$bundle]['label'], )), // Ensure field_ui_field_edit_instance_pre_render() gets called in addition - // to, not instead of, the #pre_render function(s) needed by all fieldsets. - '#pre_render' => array_merge(array('field_ui_field_edit_instance_pre_render'), element_info_property('fieldset', '#pre_render', array())), + // to, not instead of, the #pre_render function(s) needed by all details. + '#pre_render' => array_merge(array('field_ui_field_edit_instance_pre_render'), element_info_property('details', '#pre_render', array())), ); // Build the non-configurable instance values. @@ -908,7 +908,7 @@ function field_ui_field_edit_form($form, &$form_state, $instance) { // Create a form structure for the field values. $form['field'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#collapsible' => TRUE, '#collapsed' => TRUE, '#title' => t('Global settings'), @@ -966,7 +966,7 @@ function field_ui_field_edit_form_delete_submit($form, &$form_state) { /** * Render API callback: Merges instance, widget and other settings. * - * Combines the instance, widget, and other settings into a single fieldset so + * Combines the instance, widget, and other settings into a single details so * that elements within each group can be shown at different weights as if they * all had the same parent. * @@ -994,14 +994,14 @@ function field_ui_field_edit_instance_pre_render($element) { } /** - * Builds the default value fieldset for a given field instance. + * Builds the default value widget for a given field instance. */ function field_ui_default_value_widget($field, $instance, &$form, &$form_state) { $field_name = $field['field_name']; $entity = $form['#entity']; $element = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Default value'), '#collapsible' => FALSE, '#tree' => TRUE, diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php index 086f6ee..4e26616 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php @@ -337,7 +337,7 @@ public function form(array $form, array &$form_state) { // Only show the settings if there is more than one view mode. if (count($view_modes) > 1) { $form['modes'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Custom display settings'), '#collapsible' => TRUE, '#collapsed' => TRUE, diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php index 96f59a2..c61039f 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php @@ -168,11 +168,11 @@ function testViewModeCustom() { } /** - * Tests hiding the view modes fieldset when there's only one available. + * Tests hiding the view modes widget when there's only one available. */ function testSingleViewMode() { $this->drupalGet('admin/config/people/accounts/display'); - $this->assertNoText('Use custom display settings for the following view modes', 'Custom display settings fieldset found.'); + $this->assertNoText('Use custom display settings for the following view modes'); // This may not trigger a notice when 'view_modes_custom' isn't available. $this->drupalPost('admin/config/people/accounts/display', array(), t('Save')); diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc index cbd55e9..4f1db3e 100644 --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -437,7 +437,7 @@ function file_field_widget_form(&$form, &$form_state, $field, $instance, $langco // after building up the full list (like draggable table rows). $elements['#file_upload_delta'] = $delta; $elements['#theme'] = 'file_widget_multiple'; - $elements['#theme_wrappers'] = array('fieldset'); + $elements['#theme_wrappers'] = array('details'); $elements['#process'] = array('file_field_widget_process_multiple'); $elements['#title'] = $element['#title']; $elements['#description'] = $element['#description']; diff --git a/core/modules/filter/filter.admin.inc b/core/modules/filter/filter.admin.inc index 4f56856..c01fb93 100644 --- a/core/modules/filter/filter.admin.inc +++ b/core/modules/filter/filter.admin.inc @@ -284,7 +284,7 @@ function filter_admin_format_form($form, &$form_state, $format) { $settings_form = $function($form, $form_state, $filters[$name], $format, $defaults, $filters); if (!empty($settings_form)) { $form['filters']['settings'][$name] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => $filter['title'], '#parents' => array('filters', $name, 'settings'), '#weight' => $filter['weight'], diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index edf5f91..a9619ae 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -53,7 +53,7 @@ function filter_help($path, $arg) { $output .= '
' . t('%percentage of the site has been indexed.', array('%percentage' => $percentage)) . ' ' . $count . '
'; - $form['status'] = array('#type' => 'fieldset', '#title' => t('Indexing status')); + $form['status'] = array('#type' => 'details', '#title' => t('Indexing status')); $form['status']['status'] = array('#markup' => $status); $form['status']['wipe'] = array('#type' => 'submit', '#value' => t('Re-index site'), '#submit' => array('search_admin_reindex_submit')); @@ -69,7 +69,7 @@ function search_admin_settings($form, &$form_state) { // Indexing throttle: $form['indexing_throttle'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Indexing throttle') ); $form['indexing_throttle']['cron_limit'] = array( @@ -81,7 +81,7 @@ function search_admin_settings($form, &$form_state) { ); // Indexing settings: $form['indexing_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Indexing settings') ); $form['indexing_settings']['info'] = array( @@ -103,7 +103,7 @@ function search_admin_settings($form, &$form_state) { ); $form['active'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Active search modules') ); $module_options = _search_get_module_names(); diff --git a/core/modules/search/search.api.php b/core/modules/search/search.api.php index 0dd0a84..e3c8cbb 100644 --- a/core/modules/search/search.api.php +++ b/core/modules/search/search.api.php @@ -133,7 +133,7 @@ function hook_search_status() { function hook_search_admin() { // Output form for defining rank factor weights. $form['content_ranking'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Content ranking'), ); $form['content_ranking']['#theme'] = 'node_search_admin'; diff --git a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php index 9f7f42a..8db5bde 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php @@ -276,13 +276,13 @@ function assertAssertion($message, $type, $status, $file, $function) { function getTestResults() { $results = array(); if ($this->parse()) { - if ($fieldset = $this->getResultFieldSet()) { // @todo + if ($details = $this->getResultFieldSet()) { // Code assumes this is the only test in group. - $results['summary'] = $this->asText($fieldset->div->div[1]); - $results['name'] = $this->asText($fieldset->legend); // @todo + $results['summary'] = $this->asText($details->div->div[1]); + $results['name'] = $this->asText($details->summary); $results['assertions'] = array(); - $tbody = $fieldset->div->table->tbody; + $tbody = $details->div->table->tbody; foreach ($tbody->tr as $row) { $assertion = array(); $assertion['message'] = $this->asText($row->td[0]); @@ -300,14 +300,14 @@ function getTestResults() { } /** - * Get the fieldset containing the results for group this test is in. + * Get the details containing the results for group this test is in. */ function getResultFieldSet() { - $fieldsets = $this->xpath('//fieldset'); // @todo + $all_details = $this->xpath('//details'); $info = $this->getInfo(); - foreach ($fieldsets as $fieldset) { - if ($this->asText($fieldset->legend) == $info['name']) { - return $fieldset; + foreach ($all_details as $details) { + if ($this->asText($details->summary) == $info['name']) { + return $details; } } return FALSE; diff --git a/core/modules/simpletest/simpletest.pages.inc b/core/modules/simpletest/simpletest.pages.inc index 8300289..fcd90ab 100644 --- a/core/modules/simpletest/simpletest.pages.inc +++ b/core/modules/simpletest/simpletest.pages.inc @@ -10,7 +10,7 @@ */ function simpletest_test_form($form) { $form['tests'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Tests'), '#description' => t('Select the test(s) or test group(s) you would like to run, and click Run tests.'), ); @@ -41,7 +41,7 @@ function simpletest_test_form($form) { '#value' => t('Run tests'), ); $form['clean'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#collapsible' => FALSE, '#collapsed' => FALSE, '#title' => t('Clean test environment'), @@ -219,9 +219,9 @@ function simpletest_result_form($form, &$form_state, $test_id) { 'fail' => array(), ); - // Summary result fieldset. + // Summary result widget. $form['result'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Results'), ); $form['result']['summary'] = $summary = array( @@ -238,10 +238,10 @@ function simpletest_result_form($form, &$form_state, $test_id) { $header = array(t('Message'), t('Group'), t('Filename'), t('Line'), t('Function'), array('colspan' => 2, 'data' => t('Status'))); $form['result']['results'] = array(); foreach ($results as $group => $assertions) { - // Create group fieldset with summary information. + // Create group details with summary information. $info = call_user_func(array($group, 'getInfo')); $form['result']['results'][$group] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => $info['name'], '#description' => $info['description'], '#collapsible' => TRUE, @@ -289,7 +289,7 @@ function simpletest_result_form($form, &$form_state, $test_id) { // Actions. $form['#action'] = url('admin/config/development/testing/results/re-run'); $form['action'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Actions'), '#attributes' => array('class' => array('container-inline')), '#weight' => -11, diff --git a/core/modules/statistics/statistics.admin.inc b/core/modules/statistics/statistics.admin.inc index bec1eb5..5e0e256 100644 --- a/core/modules/statistics/statistics.admin.inc +++ b/core/modules/statistics/statistics.admin.inc @@ -331,7 +331,7 @@ function statistics_settings_form($form, &$form_state) { $config = config('statistics.settings'); // Access log settings. $form['access'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Access log settings'), ); $form['access']['statistics_enable_access_log'] = array( @@ -350,7 +350,7 @@ function statistics_settings_form($form, &$form_state) { // Content counter settings. $form['content'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Content viewing counter settings'), ); $form['content']['statistics_count_content_views'] = array( diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/ArrayUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/ArrayUnitTest.php index 48425e2..ede0b0b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/ArrayUnitTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/ArrayUnitTest.php @@ -36,12 +36,12 @@ function setUp() { parent::setUp(); // Create a form structure with a nested element. - $this->form['fieldset']['element'] = array( + $this->form['details']['element'] = array( '#value' => 'Nested element', ); // Set up parent array. - $this->parents = array('fieldset', 'element'); + $this->parents = array('details', 'element'); } /** @@ -57,7 +57,7 @@ function testGet() { $value['#value'] = 'New value'; $value = drupal_array_get_nested_value($this->form, $this->parents); $this->assertEqual($value['#value'], 'New value', 'Nested element value was changed by reference.'); - $this->assertEqual($this->form['fieldset']['element']['#value'], 'New value', 'Nested element value was changed by reference.'); + $this->assertEqual($this->form['details']['element']['#value'], 'New value', 'Nested element value was changed by reference.'); // Verify that an existing key is reported back. $key_exists = NULL; @@ -83,8 +83,8 @@ function testSet() { // Verify setting the value of a nested element. drupal_array_set_nested_value($this->form, $this->parents, $new_value); - $this->assertEqual($this->form['fieldset']['element']['#value'], 'New value', 'Changed nested element value found.'); - $this->assertIdentical($this->form['fieldset']['element']['#required'], TRUE, 'New nested element value found.'); + $this->assertEqual($this->form['details']['element']['#value'], 'New value', 'Changed nested element value found.'); + $this->assertIdentical($this->form['details']['element']['#required'], TRUE, 'New nested element value found.'); } /** @@ -97,13 +97,13 @@ function testUnset() { $parents = $this->parents; $parents[] = 'foo'; drupal_array_unset_nested_value($this->form, $parents, $key_existed); - $this->assertTrue(isset($this->form['fieldset']['element']['#value']), 'Outermost nested element key still exists.'); + $this->assertTrue(isset($this->form['details']['element']['#value']), 'Outermost nested element key still exists.'); $this->assertIdentical($key_existed, FALSE, 'Non-existing key not found.'); // Verify unsetting a nested element. $key_existed = NULL; drupal_array_unset_nested_value($this->form, $this->parents, $key_existed); - $this->assertFalse(isset($this->form['fieldset']['element']), 'Removed nested element not found.'); + $this->assertFalse(isset($this->form['details']['element']), 'Removed nested element not found.'); $this->assertIdentical($key_existed, TRUE, 'Existing key was found.'); } 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 67e0200..485dc50 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php @@ -94,7 +94,7 @@ function testDrupalRenderChildrenAttached() { $child_js = drupal_get_path('module', 'forum') . '/forum.js'; $subchild_js = drupal_get_path('module', 'book') . '/book.js'; $element = array( - '#type' => 'fieldset', + '#type' => 'details', '#cache' => array( 'keys' => array('simpletest', 'drupal_render', 'children_attached'), ), @@ -102,7 +102,7 @@ function testDrupalRenderChildrenAttached() { '#title' => 'Parent', ); $element['child'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#attached' => array('js' => array($child_js)), '#title' => 'Child', ); @@ -240,19 +240,19 @@ function testDrupalRenderFormElements() { )); $element = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => $this->randomName(), ); - $this->assertRenderedElement($element, '//fieldset/legend[contains(., :title)]', array( + $this->assertRenderedElement($element, '//details/summary[contains(., :title)]', array( ':title' => $element['#title'], )); - // @todo + $element = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => $this->randomName(), '#collapsible' => TRUE, ); - $this->assertRenderedElement($element, '//fieldset[contains(@class, :class)]', array( + $this->assertRenderedElement($element, '//details[contains(@class, :class)]', array( ':class' => 'collapsible', )); @@ -261,7 +261,7 @@ function testDrupalRenderFormElements() { '#title' => $this->randomName(), '#markup' => $this->randomName(), ); - $this->assertRenderedElement($element, '//fieldset/div/div[contains(@class, :class) and contains(., :markup)]', array( + $this->assertRenderedElement($element, '//details/div/div[contains(@class, :class) and contains(., :markup)]', array( ':class' => 'form-type-item', ':markup' => $element['item']['#markup'], )); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index c55289c..6f1c540 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -248,7 +248,7 @@ function system_themes_page() { function system_themes_admin_form($form, &$form_state, $theme_options) { // Administration theme settings. $form['admin_theme'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Administration theme'), ); $form['admin_theme']['admin_theme'] = array( @@ -419,7 +419,7 @@ function system_theme_settings($form, &$form_state, $key = '') { } $form['theme_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Toggle display'), '#description' => t('Enable or disable the display of certain page elements.'), ); @@ -434,7 +434,7 @@ function system_theme_settings($form, &$form_state, $key = '') { } if (!element_children($form['theme_settings'])) { - // If there is no element in the theme settings fieldset then do not show + // If there is no element in the theme settings details then do not show // it -- but keep it in the form if another module wants to alter. $form['theme_settings']['#access'] = FALSE; } @@ -442,7 +442,7 @@ function system_theme_settings($form, &$form_state, $key = '') { // Logo settings, only available when file.module is enabled. if ((!$key) || in_array('logo', $features) && module_exists('file')) { $form['logo'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Logo image settings'), '#attributes' => array('class' => array('theme-settings-bottom')), ); @@ -476,7 +476,7 @@ function system_theme_settings($form, &$form_state, $key = '') { if ((!$key) || in_array('favicon', $features) && module_exists('file')) { $form['favicon'] = array( - '#type' => 'fieldset', + '#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."), ); @@ -545,7 +545,7 @@ function system_theme_settings($form, &$form_state, $key = '') { $function = $themes[$key]->prefix . '_engine_settings'; if (function_exists($function)) { $form['engine_specific'] = array( - '#type' => 'fieldset', + '#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[$key]->prefix)), ); @@ -911,13 +911,13 @@ function system_modules($form, $form_state = array()) { $form['modules'][$module->info['package']][$filename] = _system_modules_build_row($module->info, $extra); } - // Add basic information to the fieldsets. + // Add basic information to the details. foreach (element_children($form['modules']) as $package) { $form['modules'][$package] += array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t($package), '#collapsible' => TRUE, - '#theme' => 'system_modules_fieldset', + '#theme' => 'system_modules_details', '#header' => array( array('data' => t('Enabled'), 'class' => array('checkbox')), t('Name'), @@ -925,12 +925,12 @@ function system_modules($form, $form_state = array()) { array('data' => t('Description'), 'class' => array(RESPONSIVE_PRIORITY_LOW)), array('data' => t('Operations'), 'colspan' => 3), ), - // Ensure that the "Core" package fieldset comes first. + // Ensure that the "Core" package comes first. '#weight' => $package == 'Core' ? -10 : NULL, ); } - // Lastly, sort all fieldsets by title. + // Lastly, sort all packages by title. uasort($form['modules'], 'element_sort_by_title'); $form['actions'] = array('#type' => 'actions'); @@ -1384,7 +1384,7 @@ function system_site_information_settings($form, &$form_state) { } $form['site_information'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Site details'), ); $form['site_information']['site_name'] = array( @@ -1407,7 +1407,7 @@ function system_site_information_settings($form, &$form_state) { '#required' => TRUE, ); $form['front_page'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Front page'), ); $form['front_page']['site_frontpage'] = array( @@ -1419,7 +1419,7 @@ function system_site_information_settings($form, &$form_state) { '#field_prefix' => url(NULL, array('absolute' => TRUE)), ); $form['error_page'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Error pages'), ); $form['error_page']['site_403'] = array( @@ -1513,7 +1513,7 @@ function system_cron_settings($form, &$form_state) { ); $form['cron'] = array( - '#type' => 'fieldset', + '#type' => 'details', ); $form['cron']['cron_safe_threshold'] = array( '#type' => 'select', @@ -1598,7 +1598,7 @@ function system_performance_settings($form, &$form_state) { $config = config('system.performance'); $form['clear_cache'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Clear cache'), ); @@ -1609,7 +1609,7 @@ function system_performance_settings($form, &$form_state) { ); $form['caching'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Caching'), ); @@ -1639,7 +1639,7 @@ function system_performance_settings($form, &$form_state) { } $form['bandwidth_optimization'] = array( - '#type' => 'fieldset', + '#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, ); @@ -1862,7 +1862,7 @@ function system_regional_settings() { $zones = system_time_zones(); $form['locale'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Locale'), ); @@ -1883,7 +1883,7 @@ function system_regional_settings() { ); $form['timezone'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Time zones'), ); @@ -2493,13 +2493,12 @@ function theme_status_report($variables) { * * @ingroup themeable */ -function theme_system_modules_fieldset($variables) { +function theme_system_modules_details($variables) { $form = $variables['form']; // Individual table headers. $rows = array(); - // Iterate through all the modules, which are - // children of this fieldset. + // Iterate through all the modules, which are children of this element. foreach (element_children($form) as $key) { // Stick it into $module for easier accessing. $module = $form[$key]; diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 50884c4..5ffb660 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -150,7 +150,7 @@ function system_theme() { 'confirm_form' => array( 'render element' => 'form', ), - 'system_modules_fieldset' => array( + 'system_modules_details' => array( 'render element' => 'form', 'file' => 'system.admin.inc', ), @@ -526,8 +526,7 @@ function system_element_info() { '#collapsible' => FALSE, '#collapsed' => FALSE, '#value' => NULL, - '#process' => array('form_process_fieldset', 'ajax_process_form'), - '#pre_render' => array('form_pre_render_fieldset'), + '#process' => array('ajax_process_form'), '#theme_wrappers' => array('fieldset'), ); $types['details'] = array( @@ -1268,9 +1267,9 @@ function system_library_info() { ), ); - // Drupal's collapsible fieldset. + // Drupal's collapsible details. $libraries['drupal.collapse'] = array( - 'title' => 'Drupal collapsible fieldset', + 'title' => 'Drupal collapsible details', 'version' => VERSION, 'js' => array( 'core/misc/collapse.js' => array('group' => JS_DEFAULT), @@ -2477,7 +2476,7 @@ function system_user_timezone(&$form, &$form_state) { $account = $form_state['controller']->getEntity($form_state); $form['timezone'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Locale settings'), '#weight' => 6, '#collapsible' => TRUE, 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 03b7cb8..16bb4a0 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -791,7 +791,7 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#type' => 'vertical_tabs', ); $form['tab1'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Tab 1'), '#collapsible' => TRUE, '#group' => 'vertical_tabs', @@ -802,7 +802,7 @@ function _form_test_vertical_tabs_form($form, &$form_state) { '#type' => 'textfield', ); $form['tab2'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Tab 2'), '#collapsible' => TRUE, '#group' => 'vertical_tabs', diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index f81b9e5..92185c6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -56,7 +56,7 @@ public function form(array $form, array &$form_state, EntityInterface $term) { ); $form['relations'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Relations'), '#collapsible' => TRUE, '#collapsed' => ($vocabulary->hierarchy != TAXONOMY_HIERARCHY_MULTIPLE), diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php index f6e5110..5ed9a2b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php @@ -58,7 +58,7 @@ public function form(array $form, array &$form_state, EntityInterface $vocabular ); if (module_exists('language')) { $form['default_terms_language'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Terms language'), ); $form['default_terms_language']['default_language'] = array( diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module index e7f22fd..2dae5bf 100644 --- a/core/modules/translation/translation.module +++ b/core/modules/translation/translation.module @@ -210,7 +210,7 @@ function translation_form_node_form_alter(&$form, &$form_state) { // Add translation values and workflow options. $form['tnid'] = array('#type' => 'value', '#value' => $node->tnid); $form['translation'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Translation settings'), '#access' => translation_user_can_translate_node($node), '#collapsible' => TRUE, diff --git a/core/modules/user/lib/Drupal/user/AccountFormController.php b/core/modules/user/lib/Drupal/user/AccountFormController.php index b79e983..8286b92 100644 --- a/core/modules/user/lib/Drupal/user/AccountFormController.php +++ b/core/modules/user/lib/Drupal/user/AccountFormController.php @@ -157,7 +157,7 @@ public function form(array $form, array &$form_state, EntityInterface $account) // Signature. $form['signature_settings'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Signature settings'), '#weight' => 1, '#access' => (!$register && $config->get('signatures')), @@ -173,7 +173,7 @@ public function form(array $form, array &$form_state, EntityInterface $account) // Picture/avatar. $form['picture'] = array( - '#type' => 'fieldset', + '#type' => 'details', '#title' => t('Picture'), '#weight' => 1, '#access' => (!$register && variable_get('user_pictures', 0)), @@ -212,7 +212,7 @@ public function form(array $form, array &$form_state, EntityInterface $account) include_once DRUPAL_ROOT . '/core/includes/language.inc'; $interface_language_is_default = language_negotiation_method_get_first(LANGUAGE_TYPE_INTERFACE) != LANGUAGE_NEGOTIATION_SELECTED; $form['language'] = array( - '#type' => language_multilingual() ? 'fieldset' : 'container', + '#type' => language_multilingual() ? 'details' : 'container', '#title' => t('Language settings'), // Display language selector when either creating a user on the admin // interface or editing a user account. diff --git a/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php b/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php index 7a3c7b5..407bd22 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserLanguageTest.php @@ -59,7 +59,7 @@ function testUserLanguageConfiguration() { $this->drupalLogin($web_user); $path = 'user/' . $web_user->uid . '/edit'; $this->drupalGet($path); - // Ensure language settings fieldset is available. + // Ensure language settings widget is available. $this->assertText(t('Language'), 'Language selector available.'); // Ensure custom language is present. $this->assertText($name, 'Language present on form.'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php index 399c62e..c09e8d7 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserRegistrationTest.php @@ -161,10 +161,10 @@ function testRegistrationDefaultValues() { variable_set('configurable_timezones', 1); variable_set('date_default_timezone', 'Europe/Brussels'); - // Check that the account information fieldset's options are not displayed - // as a fieldset if there is not more than one fieldset in the form. + // Check that the account information options are not displayed + // as a details element if there is not more than one details in the form. $this->drupalGet('user/register'); - $this->assertNoRaw('