diff --git a/core/includes/form.inc b/core/includes/form.inc index 428b446..0dc2ab2 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -3158,10 +3158,6 @@ function form_process_radios($element) { '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, '#weight' => $weight, ); - // Allow the parent to hide the title display of the child. - if (!isset($element[$key]['#title_display']) && isset($element['#title_display']) && $element['#title_display'] == 'invisible') { - $element[$key]['#title_display'] = 'invisible'; - } } } return $element; @@ -3312,10 +3308,6 @@ function form_process_checkboxes($element) { '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL, '#weight' => $weight, ); - // Allow the parent to hide the title display of the child. - if (!isset($element[$key]['#title_display']) && isset($element['#title_display']) && $element['#title_display'] == 'invisible') { - $element[$key]['#title_display'] = 'invisible'; - } } } return $element; diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php index 2020486..e48d38b 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php @@ -95,11 +95,15 @@ public function buildOptionsForm(&$form, &$form_state) { '#markup' => $id, ); $form['field_options'][$id]['alias'] = array( + '#title' => t('Alias for @id', array('@id' => $id)), + '#title_display' => 'invisible', '#type' => 'textfield', '#default_value' => isset($options[$id]['alias']) ? $options[$id]['alias'] : '', '#element_validate' => array(array($this, 'validateAliasName')), ); $form['field_options'][$id]['raw_output'] = array( + '#title' => t('Raw output for @id', array('@id' => $id)), + '#title_display' => 'invisible', '#type' => 'checkbox', '#default_value' => isset($options[$id]['raw_output']) ? $options[$id]['raw_output'] : '', ); diff --git a/core/modules/system/lib/Drupal/system/Form/CronForm.php b/core/modules/system/lib/Drupal/system/Form/CronForm.php index dd83495..456d3f5 100644 --- a/core/modules/system/lib/Drupal/system/Form/CronForm.php +++ b/core/modules/system/lib/Drupal/system/Form/CronForm.php @@ -84,6 +84,7 @@ public function buildForm(array $form, array &$form_state) { ); $form['cron'] = array( + '#title' => t('Cron settings'), '#type' => 'details', ); $form['cron']['cron_safe_threshold'] = 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 cb56e2b..22e9f4f 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -698,6 +698,7 @@ function _form_test_tableselect_get_data() { ); $options['row1'] = array( + 'title' => array('data' => array('#title' => t('row1'))), 'one' => 'row1col1', 'two' => t('row1col2'), 'three' => t('row1col3'), @@ -705,6 +706,7 @@ function _form_test_tableselect_get_data() { ); $options['row2'] = array( + 'title' => array('data' => array('#title' => t('row2'))), 'one' => 'row2col1', 'two' => t('row2col2'), 'three' => t('row2col3'), @@ -712,6 +714,7 @@ function _form_test_tableselect_get_data() { ); $options['row3'] = array( + 'title' => array('data' => array('#title' => t('row3'))), 'one' => 'row3col1', 'two' => t('row3col2'), 'three' => t('row3col3'), @@ -1335,25 +1338,30 @@ function form_test_language_select() { $form['#submit'] = array('_form_test_submit_values_json'); $form['languages_all'] = array( + '#title' => t('Languages: All'), '#type' => 'language_select', '#languages' => Language::STATE_ALL, '#default_value' => 'xx', ); $form['languages_configurable'] = array( + '#title' => t('Languages: Configurable'), '#type' => 'language_select', '#languages' => Language::STATE_CONFIGURABLE, '#default_value' => 'en', ); $form['languages_locked'] = array( + '#title' => t('Languages: Locked'), '#type' => 'language_select', '#languages' => Language::STATE_LOCKED, ); $form['languages_config_and_locked'] = array( + '#title' => t('Languages: Configurable and locked'), '#type' => 'language_select', '#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED, '#default_value' => 'dummy_value', ); $form['language_custom_options'] = array( + '#title' => t('Languages: Custom'), '#type' => 'language_select', '#languages' => Language::STATE_CONFIGURABLE | Language::STATE_LOCKED, '#options' => array('opt1' => 'First option', 'opt2' => 'Second option', 'opt3' => 'Third option'), @@ -2047,6 +2055,7 @@ function form_test_programmatic_form($form, &$form_state) { ); $form['checkboxes'] = array( + '#title' => t('Checkboxes'), '#type' => 'checkboxes', '#options' => array( 1 => 'First checkbox', @@ -2293,6 +2302,7 @@ function form_test_load_include_custom($form, &$form_state) { function form_test_checkbox_type_juggling($form, $form_state, $default_value, $return_value) { $form['checkbox'] = array( + '#title' => t('Checkbox'), '#type' => 'checkbox', '#return_value' => $return_value, '#default_value' => $default_value, @@ -2302,15 +2312,18 @@ function form_test_checkbox_type_juggling($form, $form_state, $default_value, $r function form_test_checkboxes_zero($form, &$form_state, $json = TRUE) { $form['checkbox_off'] = array( + '#title' => t('Checkbox off'), '#type' => 'checkboxes', '#options' => array('foo', 'bar', 'baz'), ); $form['checkbox_zero_default'] = array( + '#title' => t('Zero default'), '#type' => 'checkboxes', '#options' => array('foo', 'bar', 'baz'), '#default_value' => array(0), ); $form['checkbox_string_zero_default'] = array( + '#title' => t('Zero default (string)'), '#type' => 'checkboxes', '#options' => array('foo', 'bar', 'baz'), '#default_value' => array('0'), diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index 6b6767b..42e85c8 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -162,6 +162,11 @@ function update_manager_update_form($form, $form_state = array(), $context) { continue 2; } + // Use the project title for the tableselect checkboxes. + $entry['title'] = array('data' => array( + '#title' => $entry['title'], + '#markup' => $entry['title'], + )); $entry['#attributes'] = array('class' => array('update-' . $type)); // Drupal core needs to be upgraded manually. diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php index 645e10d..e0b7715 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php @@ -35,6 +35,7 @@ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); $form['content'] = array( + '#title' => t('Content'), '#type' => 'text_format', '#default_value' => $this->options['content'], '#rows' => 6, diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php index 2b07806..dac9815 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php @@ -34,6 +34,7 @@ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); $form['content'] = array( + '#title' => t('Content'), '#type' => 'textarea', '#default_value' => $this->options['content'], '#rows' => 6, 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 862a847..0b0f992 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 @@ -184,6 +184,8 @@ public function buildOptionsForm(&$form, &$form_state) { '#markup' => '
', ); $form['default_action'] = array( + '#title' => t('Default actions'), + '#title_display' => 'invisible', '#type' => 'radios', '#process' => array(array($this, 'processContainerRadios')), '#default_value' => $this->options['default_action'], diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php index a36f441..0b7e121 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php @@ -185,6 +185,7 @@ public function buildOptionsForm(&$form, &$form_state) { case 'attachment_position': $form['#title'] .= t('Position'); $form['attachment_position'] = array( + '#title' => t('Position'), '#type' => 'radios', '#description' => t('Attach before or after the parent display?'), '#options' => $this->attachmentPositions(), @@ -200,6 +201,7 @@ public function buildOptionsForm(&$form, &$form_state) { } } $form['displays'] = array( + '#title' => t('Displays'), '#type' => 'checkboxes', '#description' => t('Select which display or displays this should attach to.'), '#options' => $displays, diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 304c0b1..df5f26c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -1486,6 +1486,8 @@ public function buildOptionsForm(&$form, &$form_state) { $access = $this->getOption('access'); $form['access']['type'] = array( + '#title' => t('Access'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('access', $this->getType(), array($this->view->storage->get('base_table'))), '#default_value' => $access['type'], @@ -1521,6 +1523,8 @@ public function buildOptionsForm(&$form, &$form_state) { $cache = $this->getOption('cache'); $form['cache']['type'] = array( + '#title' => t('Caching'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('cache', $this->getType(), array($this->view->storage->get('base_table'))), '#default_value' => $cache['type'], @@ -1613,6 +1617,7 @@ public function buildOptionsForm(&$form, &$form_state) { $style_plugin = $this->getPlugin('style'); $form['style'] = array( '#title' => t('Style'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('style', $this->getType(), array($this->view->storage->get('base_table'))), '#default_value' => $style_plugin->definition['id'], @@ -1656,6 +1661,7 @@ public function buildOptionsForm(&$form, &$form_state) { $row_plugin_instance = $this->getPlugin('row'); $form['row'] = array( '#title' => t('Row'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('row', $this->getType(), array($this->view->storage->get('base_table'))), '#default_value' => $row_plugin_instance->definition['id'], @@ -1978,6 +1984,8 @@ public function buildOptionsForm(&$form, &$form_state) { $exposed_form = $this->getOption('exposed_form'); $form['exposed_form']['type'] = array( + '#title' => t('Exposed form'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('exposed_form', $this->getType(), array($this->view->storage->get('base_table'))), '#default_value' => $exposed_form['type'], @@ -2012,6 +2020,8 @@ public function buildOptionsForm(&$form, &$form_state) { $pager = $this->getOption('pager'); $form['pager']['type'] = array( + '#title' => t('Pager'), + '#title_display' => 'invisible', '#type' => 'radios', '#options' => views_fetch_plugin_names('pager', !$this->usesPager() ? 'basic' : NULL, array($this->view->storage->get('base_table'))), '#default_value' => $pager['type'], diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php index 92306db..552663c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php @@ -1043,7 +1043,6 @@ protected function buildExposedFiltersGroupForm(&$form, &$form_state) { // From all groups, let chose which is the default. $form['group_info']['default_group'] = array( '#type' => 'radios', - '#title_display' => 'invisible', '#options' => $groups, '#default_value' => $this->options['group_info']['default_group'], '#required' => TRUE, diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php index 83a4336..3aea6da 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php @@ -80,6 +80,7 @@ public function buildOptionsForm(&$form, &$form_state) { case 'test_option': $form['#title'] .= t('Test option'); $form['test_option'] = array( + '#title' => t('Test option'), '#type' => 'textfield', '#description' => t('This is a textfield for test_option.'), '#default_value' => $this->getOption('test_option'), diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php index d6dedf9..12cd1db 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php @@ -50,6 +50,7 @@ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); $form['test_option'] = array( + '#title' => t('Test option'), '#type' => 'textfield', '#description' => t('This is a textfield for test_option.'), '#default_value' => $this->options['test_option'], diff --git a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.php index 26a3112..8f0a810 100644 --- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.php +++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.php @@ -57,6 +57,7 @@ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); $form['test_option'] = array( + '#title' => t('Test option'), '#type' => 'textfield', '#description' => t('This is a textfield for test_option.'), '#default_value' => $this->options['test_option'],