summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2013-09-11 06:53:36 (GMT)
committerwebchick2013-09-11 07:16:22 (GMT)
commitf503d2282a4d03e66cc9f298a9e4ff17decb876a (patch)
tree737cd22f5013ca188365bc3c28db2730b87785f1
parent11eeb98bf3ff68d03aec89cfc33c42e02da9db6b (diff)
Issue #2074509 by tim.plunkett, falcon03, mgifford, Xano: Fixed Add missing #title property to ensure form accessibility.
-rw-r--r--core/includes/install.core.inc1
-rw-r--r--core/modules/action/lib/Drupal/action/ActionFormControllerBase.php1
-rw-r--r--core/modules/block/lib/Drupal/block/BlockFormController.php1
-rw-r--r--core/modules/block/lib/Drupal/block/BlockListController.php4
-rw-r--r--core/modules/book/book.admin.inc2
-rw-r--r--core/modules/comment/comment.admin.inc1
-rw-r--r--core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php2
-rw-r--r--core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php3
-rw-r--r--core/modules/content_translation/content_translation.admin.inc2
-rw-r--r--core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php2
-rw-r--r--core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php6
-rw-r--r--core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php1
-rw-r--r--core/modules/language/tests/language_elements_test/language_elements_test.module1
-rw-r--r--core/modules/locale/css/locale.admin.css3
-rw-r--r--core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php2
-rw-r--r--core/modules/locale/locale.pages.inc21
-rw-r--r--core/modules/menu/lib/Drupal/menu/MenuFormController.php2
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/Condition/NodeType.php1
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php4
-rw-r--r--core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php4
-rw-r--r--core/modules/system/lib/Drupal/system/Form/CronForm.php1
-rw-r--r--core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php1
-rw-r--r--core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module3
-rw-r--r--core/modules/system/tests/modules/batch_test/batch_test.module1
-rw-r--r--core/modules/system/tests/modules/database_test/database_test.module2
-rw-r--r--core/modules/system/tests/modules/form_test/form_test.module18
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php2
-rw-r--r--core/modules/update/update.manager.inc5
-rw-r--r--core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php1
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php1
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php16
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php1
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php1
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php14
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php1
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php18
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php4
-rw-r--r--core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display/DisplayTest.php1
-rw-r--r--core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php1
-rw-r--r--core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/row/RowTest.php1
-rw-r--r--core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.php1
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php18
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php6
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ReorderDisplays.php2
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php1
-rw-r--r--core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php2
49 files changed, 151 insertions, 42 deletions
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 0a2cb29..86fe8c6 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -2470,6 +2470,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
);
$form['update_notifications']['update_status_module'] = array(
'#type' => 'checkboxes',
+ '#title' => t('Update notifications'),
'#options' => array(
1 => t('Check for updates automatically'),
2 => t('Receive e-mail notifications'),
diff --git a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
index 021ec93..2bd8573 100644
--- a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
+++ b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
@@ -72,7 +72,6 @@ abstract class ActionFormControllerBase extends EntityFormController {
$form['id'] = array(
'#type' => 'machine_name',
- '#title' => $this->t('Machine name'),
'#default_value' => $this->entity->id(),
'#disabled' => !$this->entity->isNew(),
'#maxlength' => 64,
diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php
index ed8f28b..bd5c4ba 100644
--- a/core/modules/block/lib/Drupal/block/BlockFormController.php
+++ b/core/modules/block/lib/Drupal/block/BlockFormController.php
@@ -102,7 +102,6 @@ class BlockFormController extends EntityFormController {
// If creating a new block, calculate a safe default machine name.
$form['machine_name'] = array(
'#type' => 'machine_name',
- '#title' => $this->t('Machine name'),
'#maxlength' => 64,
'#description' => $this->t('A unique name for this block instance. Must be alpha-numeric and underscore separated.'),
'#default_value' => !$entity->isNew() ? $entity->id() : $this->getUniqueMachineName($entity),
diff --git a/core/modules/block/lib/Drupal/block/BlockListController.php b/core/modules/block/lib/Drupal/block/BlockListController.php
index f4e2a5e..1e90c2b 100644
--- a/core/modules/block/lib/Drupal/block/BlockListController.php
+++ b/core/modules/block/lib/Drupal/block/BlockListController.php
@@ -262,8 +262,8 @@ class BlockListController extends ConfigEntityListController implements FormInte
'#type' => 'select',
'#default_value' => $region,
'#empty_value' => BLOCK_REGION_NONE,
- '#title_display' => 'invisible',
'#title' => t('Region for @block block', array('@block' => $info['admin_label'])),
+ '#title_display' => 'invisible',
'#options' => $this->regions,
'#attributes' => array(
'class' => array('block-region-select', 'block-region-' . $region),
@@ -279,8 +279,8 @@ class BlockListController extends ConfigEntityListController implements FormInte
'#type' => 'weight',
'#default_value' => $info['weight'],
'#delta' => $weight_delta,
- '#title_display' => 'invisible',
'#title' => t('Weight for @block block', array('@block' => $info['admin_label'])),
+ '#title_display' => 'invisible',
'#attributes' => array(
'class' => array('block-weight', 'block-weight-' . $region),
),
diff --git a/core/modules/book/book.admin.inc b/core/modules/book/book.admin.inc
index 40dc0bf..89e132e 100644
--- a/core/modules/book/book.admin.inc
+++ b/core/modules/book/book.admin.inc
@@ -160,6 +160,8 @@ function _book_admin_table_tree($tree, &$form) {
'depth' => array('#type' => 'value', '#value' => $data['link']['depth']),
'href' => array('#type' => 'value', '#value' => $data['link']['href']),
'title' => array(
+ '#title' => t('Title'),
+ '#title_display' => 'invisible',
'#type' => 'textfield',
'#default_value' => $data['link']['link_title'],
'#maxlength' => 255,
diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc
index 4bbff56..741ad5c 100644
--- a/core/modules/comment/comment.admin.inc
+++ b/core/modules/comment/comment.admin.inc
@@ -118,6 +118,7 @@ function comment_admin_overview($form, &$form_state, $arg) {
'#account' => comment_prepare_author($comment),
);
$options[$comment->id()] = array(
+ 'title' => array('data' => array('#title' => $comment->subject->value ?: $comment->id())),
'subject' => array(
'data' => array(
'#type' => 'link',
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php
index 8bfb7cb..422e656 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/wizard/Comment.php
@@ -88,8 +88,8 @@ class Comment extends WizardPluginBase {
case 'comment':
$style_form['row_options']['links'] = array(
'#type' => 'select',
- '#title_display' => 'invisible',
'#title' => t('Should links be displayed below each comment'),
+ '#title_display' => 'invisible',
'#options' => array(
1 => t('with links (allow users to reply to the comment, etc.)'),
0 => t('without links'),
diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php b/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
index 40429c7..ebdeb49 100644
--- a/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
+++ b/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
@@ -59,9 +59,10 @@ class ConfigImportForm extends FormBase {
);
$form['import_tarball'] = array(
'#type' => 'file',
- '#value' => $this->t('Select your configuration export file'),
+ '#title' => $this->t('Select your configuration export file'),
'#description' => $this->t('This form will redirect you to the import configuration screen.'),
);
+
$form['submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Upload'),
diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc
index c5b8cfe..da4558a 100644
--- a/core/modules/content_translation/content_translation.admin.inc
+++ b/core/modules/content_translation/content_translation.admin.inc
@@ -89,6 +89,7 @@ function _content_translation_form_language_content_settings_form_alter(array &$
if ($fields) {
$form['settings'][$entity_type][$bundle]['translatable'] = array(
'#type' => 'checkbox',
+ '#title' => $bundle,
'#default_value' => content_translation_enabled($entity_type, $bundle),
);
@@ -99,6 +100,7 @@ function _content_translation_form_language_content_settings_form_alter(array &$
$form['settings'][$entity_type][$bundle]['fields'][$field_name] = array(
'#label' => $instance['label'],
'#type' => 'checkbox',
+ '#title' => $instance['label'],
'#default_value' => $field['translatable'],
);
$column_element = content_translation_field_sync_widget($field, $instance);
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 503bd3b..7e0b20e 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationController.php
@@ -155,6 +155,8 @@ class ContentTranslationController implements ContentTranslationControllerInterf
'#weight' => -100,
'#multilingual' => TRUE,
'source' => array(
+ '#title' => t('Select source language'),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#default_value' => $source_langcode,
'#options' => array(),
diff --git a/core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php b/core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php
index ba260f2..b679139 100644
--- a/core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php
+++ b/core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php
@@ -34,7 +34,11 @@ class UnicornEditor extends EditorBase {
* Implements \Drupal\editor\Plugin\EditPluginInterface::settingsForm().
*/
function settingsForm(array $form, array &$form_state, EditorEntity $editor) {
- $form['foo'] = array('#type' => 'textfield', '#default_value' => 'bar');
+ $form['foo'] = array(
+ '#title' => t('Foo'),
+ '#type' => 'textfield',
+ '#default_value' => 'bar',
+ );
return $form;
}
diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
index 1536071..93f595c 100644
--- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
+++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php
@@ -82,7 +82,6 @@ abstract class EntityDisplayModeFormBase extends EntityFormController {
$form['id'] = array(
'#type' => 'machine_name',
- '#title' => t('Machine-readable name'),
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
'#disabled' => !$this->entity->isNew(),
'#default_value' => $this->entity->id(),
diff --git a/core/modules/language/tests/language_elements_test/language_elements_test.module b/core/modules/language/tests/language_elements_test/language_elements_test.module
index 6030e4c..14d8927 100644
--- a/core/modules/language/tests/language_elements_test/language_elements_test.module
+++ b/core/modules/language/tests/language_elements_test/language_elements_test.module
@@ -54,6 +54,7 @@ function language_elements_configuration_element() {
*/
function language_elements_configuration_element_test() {
$form['langcode'] = array(
+ '#title' => t('Language select'),
'#type' => 'language_select',
'#default_value' => language_get_default_langcode('custom_type', 'some_bundle'),
);
diff --git a/core/modules/locale/css/locale.admin.css b/core/modules/locale/css/locale.admin.css
index c1e05e9..5d7b032 100644
--- a/core/modules/locale/css/locale.admin.css
+++ b/core/modules/locale/css/locale.admin.css
@@ -85,9 +85,10 @@
background: transparent url(../../../misc/menu-expanded.png) left .6em no-repeat;
}
-#locale-translation-status-form label {
+#locale-translation-status-form .label {
color: #1d1d1d;
font-size: 1.15em;
+ font-weight: bold;
}
#locale-translation-status-form .description {
cursor: pointer;
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
index 9f55abc..d6fb45f 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleUpdateTest.php
@@ -167,7 +167,7 @@ class LocaleUpdateTest extends LocaleUpdateBase {
$this->drupalGet('admin/reports/translations/check');
// Check the status on the Available translation status page.
- $this->assertRaw('<label for="edit-langcodes-de" class="language-name">German</label>', 'German language found');
+ $this->assertRaw('<label class="visually-hidden" for="edit-langcodes-de">Update German</label>', 'German language found');
$this->assertText('Updates for: Contributed module one, Contributed module two, Custom module one, Locale test', 'Updates found');
$this->assertText('Contributed module one (' . format_date($this->timestamp_now, 'html_date') . ')', 'Updates for Contrib module one');
$this->assertText('Contributed module two (' . format_date($this->timestamp_new, 'html_date') . ')', 'Updates for Contrib module two');
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index 15fefb6..3d366a5 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -5,6 +5,7 @@
* Interface translation summary, editing and deletion user interfaces.
*/
+use Drupal\Component\Utility\String;
use Drupal\Core\Language\Language;
use Drupal\locale\SourceString;
use Drupal\locale\TranslationString;
@@ -520,6 +521,7 @@ function locale_translation_status_form($form, &$form_state) {
// Build data options for the select table.
foreach($updates as $langcode => $update) {
+ $title = String::checkPlain($languages[$langcode]->name);
$locale_translation_update_info = array('#theme' => 'locale_translation_update_info');
foreach (array('updates', 'not_found') as $update_status) {
if (isset($update[$update_status])) {
@@ -527,12 +529,20 @@ function locale_translation_status_form($form, &$form_state) {
}
}
$options[$langcode] = array(
- 'title' => check_plain($languages[$langcode]->name),
+ 'title' => array(
+ 'class' => array('label'),
+ 'data' => array(
+ '#title' => $title,
+ '#markup' => $title
+ ),
+ ),
'status' => array('class' => array('description', 'expand', 'priority-low'), 'data' => drupal_render($locale_translation_update_info)),
);
}
// Sort the table data on language name.
- uasort($options, 'drupal_sort_title');
+ uasort($options, function ($a, $b) {
+ return strcasecmp($a['title']['data']['#title'], $b['title']['data']['#title']);
+ });
}
$last_checked = Drupal::state()->get('locale.translation_last_checked');
@@ -639,13 +649,6 @@ function locale_translation_status_form_submit($form, &$form_state) {
* translation files could not be found.
*/
function locale_translation_language_table($form_element) {
- // Add labels to Language names.
- foreach ($form_element['#options'] as $langcode => $option) {
- $id = $form_element[$langcode]['#id'];
- $title = $option['title'];
- $form_element['#options'][$langcode]['title'] = '<label for="' . $form_element[$langcode]['#id'] . '" class="language-name">' . $title . '</label>';
- }
-
// Remove checkboxes of languages without updates.
if ($form_element['#not_found']) {
foreach ($form_element['#not_found'] as $langcode) {
diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
index e57dfb3..68bc6a4 100644
--- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php
+++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php
@@ -315,8 +315,8 @@ class MenuFormController extends EntityFormController {
'#type' => 'weight',
'#delta' => $delta,
'#default_value' => $item['weight'],
- '#title_display' => 'invisible',
'#title' => t('Weight for @title', array('@title' => $item['title'])),
+ '#title_display' => 'invisible',
);
$form[$mlid]['mlid'] = array(
'#type' => 'hidden',
diff --git a/core/modules/node/lib/Drupal/node/Plugin/Condition/NodeType.php b/core/modules/node/lib/Drupal/node/Plugin/Condition/NodeType.php
index bf71eb2..b9d2a9c 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/Condition/NodeType.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/Condition/NodeType.php
@@ -39,6 +39,7 @@ class NodeType extends ConditionPluginBase {
$options[$type->type] = $type->name;
}
$form['bundles'] = array(
+ '#title' => t('Node types'),
'#type' => 'checkboxes',
'#options' => $options,
'#required' => TRUE,
diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
index c4f4d57..e17158d 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/views/wizard/Node.php
@@ -107,8 +107,8 @@ class Node extends WizardPluginBase {
case 'teasers':
$style_form['row_options']['links'] = array(
'#type' => 'select',
- '#title_display' => 'invisible',
'#title' => t('Should links be displayed below each node'),
+ '#title_display' => 'invisible',
'#options' => array(
1 => t('with links (allow users to add comments, etc.)'),
0 => t('without links'),
@@ -117,8 +117,8 @@ class Node extends WizardPluginBase {
);
$style_form['row_options']['comments'] = array(
'#type' => 'select',
- '#title_display' => 'invisible',
'#title' => t('Should comments be displayed below each node'),
+ '#title_display' => 'invisible',
'#options' => array(
1 => t('with comments'),
0 => t('without comments'),
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 9622d84..60b244c 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
@@ -94,11 +94,15 @@ class DataFieldRow extends RowPluginBase {
'#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 31c599b..e805ec9 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 @@ class CronForm extends SystemConfigFormBase {
);
$form['cron'] = array(
+ '#title' => t('Cron settings'),
'#type' => 'details',
);
$form['cron']['cron_safe_threshold'] = array(
diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
index e04a610..2205942 100644
--- a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
+++ b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php
@@ -125,7 +125,6 @@ abstract class DateFormatFormBase extends EntityFormController {
$form['id'] = array(
'#type' => 'machine_name',
- '#title' => t('Machine-readable name'),
'#description' => t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
'#disabled' => !$this->entity->isNew(),
'#default_value' => $this->entity->id(),
diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
index 291f7bb..175d593 100644
--- a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
+++ b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
@@ -49,6 +49,7 @@ function ajax_forms_test_simple_form($form, &$form_state) {
$form = array();
$form['select'] = array(
+ '#title' => t('Color'),
'#type' => 'select',
'#options' => array(
'red' => 'red',
@@ -83,6 +84,7 @@ function ajax_forms_test_simple_form($form, &$form_state) {
foreach ($invalid_callbacks as $key => $value) {
$form['select_' . $key . '_callback'] = array(
'#type' => 'select',
+ '#title' => t('Test %key callbacks', array('%key' => $key)),
'#options' => array('red' => 'red'),
'#ajax' => array('callback' => $value),
);
@@ -542,6 +544,7 @@ function ajax_forms_test_lazy_load_form($form, &$form_state) {
'data' => array('test' => 'currentPathUpdate'),
);
$form['add_files'] = array(
+ '#title' => t('Add files'),
'#type' => 'checkbox',
'#default_value' => FALSE,
);
diff --git a/core/modules/system/tests/modules/batch_test/batch_test.module b/core/modules/system/tests/modules/batch_test/batch_test.module
index 2c1bee2..7660c73 100644
--- a/core/modules/system/tests/modules/batch_test/batch_test.module
+++ b/core/modules/system/tests/modules/batch_test/batch_test.module
@@ -312,6 +312,7 @@ function _batch_test_nested_drupal_form_submit_callback($value) {
*/
function batch_test_mock_form($form, $form_state) {
$form['test_value'] = array(
+ '#title' => t('Test value'),
'#type' => 'textfield',
);
$form['submit'] = array(
diff --git a/core/modules/system/tests/modules/database_test/database_test.module b/core/modules/system/tests/modules/database_test/database_test.module
index b390004..518e3aa 100644
--- a/core/modules/system/tests/modules/database_test/database_test.module
+++ b/core/modules/system/tests/modules/database_test/database_test.module
@@ -1,5 +1,6 @@
<?php
+use Drupal\Component\Utility\String;
use Drupal\Core\Database\Query\AlterableInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -233,6 +234,7 @@ function database_test_theme_tablesort($form, &$form_state) {
foreach (user_load_multiple($uids) as $account) {
$options[$account->id()] = array(
+ 'title' => array('data' => array('#title' => String::checkPlain($account->getUsername()))),
'username' => check_plain($account->getUsername()),
'status' => $account->isActive() ? t('active') : t('blocked'),
);
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 3e7c089..8b46c83 100644
--- a/core/modules/system/tests/modules/form_test/form_test.module
+++ b/core/modules/system/tests/modules/form_test/form_test.module
@@ -701,6 +701,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'),
@@ -708,6 +709,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'),
@@ -715,6 +717,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'),
@@ -1044,21 +1047,21 @@ function form_label_test_form() {
$form['form_checkboxes_title_attribute'] = array(
'#type' => 'checkboxes',
'#title' => 'Checkboxes test',
+ '#title_display' => 'attribute',
'#options' => array(
'first-checkbox' => 'First checkbox',
'second-checkbox' => 'Second checkbox',
),
- '#title_display' => 'attribute',
'#required' => TRUE,
);
$form['form_radios_title_attribute'] = array(
'#type' => 'radios',
'#title' => 'Radios test',
+ '#title_display' => 'attribute',
'#options' => array(
'first-radio' => 'First radio',
'second-radio' => 'Second radio',
),
- '#title_display' => 'attribute',
'#required' => TRUE,
);
@@ -1338,25 +1341,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'),
@@ -1907,6 +1915,7 @@ function _form_test_input_forgery($form, &$form_state) {
// For testing that a user can't submit a value not matching one of the
// allowed options.
$form['checkboxes'] = array(
+ '#title' => t('Checkboxes'),
'#type' => 'checkboxes',
'#options' => array(
'one' => 'One',
@@ -2050,6 +2059,7 @@ function form_test_programmatic_form($form, &$form_state) {
);
$form['checkboxes'] = array(
+ '#title' => t('Checkboxes'),
'#type' => 'checkboxes',
'#options' => array(
1 => 'First checkbox',
@@ -2296,6 +2306,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,
@@ -2305,15 +2316,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/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php
index d79af40..fb682bc 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/OverviewTerms.php
@@ -258,8 +258,8 @@ class OverviewTerms extends FormBase {
$form['terms'][$key]['weight'] = array(
'#type' => 'weight',
'#delta' => $delta,
- '#title_display' => 'invisible',
'#title' => $this->t('Weight for added term'),
+ '#title_display' => 'invisible',
'#default_value' => $term->weight->value,
'#attributes' => array(
'class' => array('term-weight'),
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index 9e9d73a..ea31026 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/user/lib/Drupal/user/Form/UserPermissionsForm.php b/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php
index abadd30..0f0aa0f 100644
--- a/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php
+++ b/core/modules/user/lib/Drupal/user/Form/UserPermissionsForm.php
@@ -139,7 +139,7 @@ class UserPermissionsForm extends FormBase {
'restrict access' => FALSE,
'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
);
- $options[$perm] = '';
+ $options[$perm] = $perm_item['title'];
$user_permission_description = array(
'#theme' => 'user_permission_description',
'#permission_item' => $perm_item,
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 71124a2..a9dd6c5 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 @@ class Text extends TokenizeAreaPluginBase {
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 @@ class TextCustom extends TokenizeAreaPluginBase {
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 @@ abstract class ArgumentPluginBase extends HandlerBase {
'#markup' => '<div class="clearfix"></div>',
);
$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 17df434..8f58111 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 @@ class Attachment extends DisplayPluginBase {
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 @@ class Attachment extends DisplayPluginBase {
}
}
$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 b09320c..424b068 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
@@ -1411,6 +1411,7 @@ abstract class DisplayPluginBase extends PluginBase {
case 'title':
$form['#title'] .= t('The title of this view');
$form['title'] = array(
+ '#title' => t('Title'),
'#type' => 'textfield',
'#description' => t('This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc.'),
'#default_value' => $this->getOption('title'),
@@ -1500,6 +1501,8 @@ abstract class DisplayPluginBase extends PluginBase {
$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'],
@@ -1535,6 +1538,8 @@ abstract class DisplayPluginBase extends PluginBase {
$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'],
@@ -1626,6 +1631,8 @@ abstract class DisplayPluginBase extends PluginBase {
$form['#title'] .= t('How should this view be styled');
$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'],
@@ -1668,6 +1675,8 @@ abstract class DisplayPluginBase extends PluginBase {
$form['#title'] .= t('How should each row in this view be styled');
$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'],
@@ -1692,6 +1701,7 @@ abstract class DisplayPluginBase extends PluginBase {
$options['custom_url'] = t('Custom URL');
if (count($options)) {
$form['link_display'] = array(
+ '#title' => t('Custom URL'),
'#type' => 'radios',
'#options' => $options,
'#description' => t("Which display to use to get this display's path for things like summary links, rss feed links, more links, etc."),
@@ -1859,6 +1869,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#suffix' => '</div>',
);
$form['box']['theme'] = array(
+ '#title' => t('Theme'),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#options' => $options,
'#default_value' => $this->theme,
@@ -1987,6 +1999,8 @@ abstract class DisplayPluginBase extends PluginBase {
$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'],
@@ -2021,6 +2035,8 @@ abstract class DisplayPluginBase extends PluginBase {
$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/display/Feed.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php
index 8d61458..cba3810 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php
@@ -218,6 +218,7 @@ class Feed extends PathPluginBase {
}
}
$form['displays'] = array(
+ '#title' => t('Displays'),
'#type' => 'checkboxes',
'#description' => t('The feed icon will be available only to the selected displays.'),
'#options' => $displays,
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
index 57691f1..79795d2 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
@@ -305,6 +305,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter
$form['#title'] .= t('The menu path or URL of this view');
$form['path'] = array(
'#type' => 'textfield',
+ '#title' => t('Path'),
'#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".'),
'#default_value' => $this->getOption('path'),
'#field_prefix' => '<span dir="ltr">' . url(NULL, array('absolute' => TRUE)),
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 316f980..943814a 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
@@ -8,6 +8,7 @@
namespace Drupal\views\Plugin\views\filter;
use Drupal\views\Plugin\views\HandlerBase;
+use Drupal\Component\Utility\String;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\ViewExecutable;
@@ -745,6 +746,7 @@ abstract class FilterPluginBase extends HandlerBase {
$value = $this->options['group_info']['identifier'];
$form[$value] = array(
+ '#title' => String::checkPlain($this->options['group_info']['label']),
'#type' => $this->options['group_info']['widget'],
'#default_value' => $this->group_info,
'#options' => $groups,
@@ -785,10 +787,6 @@ abstract class FilterPluginBase extends HandlerBase {
$this->operatorForm($form, $form_state);
$form[$operator] = $form['operator'];
- if (isset($form[$operator]['#title'])) {
- unset($form[$operator]['#title']);
- }
-
$this->exposedTranslate($form[$operator], 'operator');
unset($form['operator']);
@@ -954,7 +952,7 @@ abstract class FilterPluginBase extends HandlerBase {
// In each row, we have to display the operator form and the value from
// $row acts as a fake form to render each widget in a row.
$row = array();
- $groups[$item_id] = '';
+ $groups[$item_id] = t('Grouping @id', array('@id' => $item_id));
$this->operatorForm($row, $form_state);
// Force the operator form to be a select box. Some handlers uses
// radios and they occupy a lot of space in a table row.
@@ -1012,12 +1010,16 @@ abstract class FilterPluginBase extends HandlerBase {
// Per item group, we have a title that identifies it.
$form['group_info']['group_items'][$item_id] = array(
'title' => array(
+ '#title' => t('Label'),
+ '#title_display' => 'invisible',
'#type' => 'textfield',
'#size' => 20,
'#default_value' => $default_title,
),
'operator' => $row['operator'],
'value' => $row['value'],
+ // No title is given here, since this input is never displayed. It is
+ // only triggered by JavaScript.
'remove' => array(
'#type' => 'checkbox',
'#id' => 'views-removed-' . $item_id,
@@ -1025,6 +1027,8 @@ abstract class FilterPluginBase extends HandlerBase {
'#default_value' => 0,
),
'weight' => array(
+ '#title' => t('Weight'),
+ '#title_display' => 'invisible',
'#type' => 'weight',
'#delta' => 10,
'#default_value' => $default_weight++,
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php
index ddd022c..d9b6326 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php
@@ -164,6 +164,7 @@ abstract class SortPluginBase extends HandlerBase {
$options = $this->sortOptions();
if (!empty($options)) {
$form['order'] = array(
+ '#title' => t('Order'),
'#type' => 'radios',
'#options' => $options,
'#default_value' => $this->options['order'],
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 de5eef1..121047a 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
@@ -301,12 +301,16 @@ class Table extends StylePluginBase {
$column_selector = ':input[name="style_options[columns][' . $field . ']"]';
$form['columns'][$field] = array(
+ '#title' => t('Columns for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#options' => $field_names,
'#default_value' => $column,
);
if ($handlers[$field]->clickSortable()) {
$form['info'][$field]['sortable'] = array(
+ '#title' => t('Sortable for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'checkbox',
'#default_value' => !empty($this->options['info'][$field]['sortable']),
'#states' => array(
@@ -316,6 +320,8 @@ class Table extends StylePluginBase {
),
);
$form['info'][$field]['default_sort_order'] = array(
+ '#title' => t('Default sort order for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#options' => array('asc' => t('Ascending'), 'desc' => t('Descending')),
'#default_value' => !empty($this->options['info'][$field]['default_sort_order']) ? $this->options['info'][$field]['default_sort_order'] : 'asc',
@@ -329,6 +335,8 @@ class Table extends StylePluginBase {
// Provide an ID so we can have such things.
$radio_id = drupal_html_id('edit-default-' . $field);
$form['default'][$field] = array(
+ '#title' => t('Default sort for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'radio',
'#return_value' => $field,
'#parents' => array('style_options', 'default'),
@@ -344,6 +352,8 @@ class Table extends StylePluginBase {
);
}
$form['info'][$field]['align'] = array(
+ '#title' => t('Alignment for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#default_value' => !empty($this->options['info'][$field]['align']) ? $this->options['info'][$field]['align'] : '',
'#options' => array(
@@ -359,6 +369,8 @@ class Table extends StylePluginBase {
),
);
$form['info'][$field]['separator'] = array(
+ '#title' => t('Separator for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'textfield',
'#size' => 10,
'#default_value' => isset($this->options['info'][$field]['separator']) ? $this->options['info'][$field]['separator'] : '',
@@ -369,6 +381,8 @@ class Table extends StylePluginBase {
),
);
$form['info'][$field]['empty_column'] = array(
+ '#title' => t('Hide empty column for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'checkbox',
'#default_value' => isset($this->options['info'][$field]['empty_column']) ? $this->options['info'][$field]['empty_column'] : FALSE,
'#states' => array(
@@ -378,6 +392,8 @@ class Table extends StylePluginBase {
),
);
$form['info'][$field]['responsive'] = array(
+ '#title' => t('Responsive setting for @field', array('@field' => $field)),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#default_value' => isset($this->options['info'][$field]['responsive']) ? $this->options['info'][$field]['responsive'] : '',
'#options' => array('' => t('High'), RESPONSIVE_PRIORITY_MEDIUM => t('Medium'), RESPONSIVE_PRIORITY_LOW => t('Low')),
@@ -396,6 +412,8 @@ class Table extends StylePluginBase {
// Provide a radio for no default sort
$form['default'][-1] = array(
+ '#title' => t('No default sort'),
+ '#title_display' => 'invisible',
'#type' => 'radio',
'#return_value' => -1,
'#parents' => array('style_options', 'default'),
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
index 7e3dea6..00fad4c 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
@@ -211,6 +211,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
$form['displays']['page'] = array(
'#type' => 'fieldset',
+ '#title' => t('Page settings'),
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
'#tree' => TRUE,
);
@@ -248,6 +249,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
);
$form['displays']['page']['options']['style'] = array(
'#type' => 'fieldset',
+ '#title' => t('Page display settings'),
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
);
@@ -354,6 +356,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
$form['displays']['block'] = array(
'#type' => 'fieldset',
+ '#title' => t('Block settings'),
'#attributes' => array('class' => array('views-attachment', 'fieldset-no-legend')),
'#tree' => TRUE,
);
@@ -385,6 +388,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
);
$form['displays']['block']['options']['style'] = array(
'#type' => 'fieldset',
+ '#title' => t('Block display settings'),
'#attributes' => array('class' => array('container-inline', 'fieldset-no-legend')),
);
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 162f77d..e8ffa64 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
@@ -82,6 +82,7 @@ class DisplayTest extends DisplayPluginBase {
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/display_extender/DisplayExtenderTest.php b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php
index 50e10da..4251971 100644
--- a/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php
+++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php
@@ -69,6 +69,7 @@ class DisplayExtenderTest extends DisplayExtenderPluginBase {
case 'test_extender_test_option':
$form['#title'] .= t('Test option');
$form['test_extender_test_option'] = array(
+ '#title' => t('Test option'),
'#type' => 'textfield',
'#description' => t('This is a textfield for test_option.'),
'#default_value' => $this->displayHandler->getOption('test_extender_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 706fd65..8dd4562 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 @@ class RowTest extends RowPluginBase {
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 a4156c5..66162dc 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
@@ -58,6 +58,7 @@ class StyleTest extends StylePluginBase {
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_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php
index 8748674..b5364d0 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/Rearrange.php
@@ -95,23 +95,26 @@ class Rearrange extends ViewsFormBase {
if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
$name = '(' . $relationships[$field['relationship']] . ') ' . $name;
}
-
- $form['fields'][$id]['name'] = array(
- '#markup' => $name,
- );
+ $markup = $name;
}
else {
- $form['fields'][$id]['name'] = array('#markup' => $this->t('Broken field @id', array('@id' => $id)));
+ $name = $id;
+ $markup = $this->t('Broken field @id', array('@id' => $id));
}
+ $form['fields'][$id]['name'] = array('#markup' => $markup);
$form['fields'][$id]['weight'] = array(
'#type' => 'textfield',
'#default_value' => ++$count,
'#attributes' => array('class' => array('weight')),
+ '#title' => t('Weight for @title', array('@title' => $name)),
+ '#title_display' => 'invisible',
);
$form['fields'][$id]['removed'] = array(
'#type' => 'checkbox',
+ '#title' => t('Remove @title', array('@title' => $name)),
+ '#title_display' => 'invisible',
'#id' => 'views-removed-' . $id,
'#attributes' => array('class' => array('views-remove-checkbox')),
'#default_value' => 0,
@@ -119,11 +122,6 @@ class Rearrange extends ViewsFormBase {
);
}
- $name = NULL;
- if (isset($form_state['update_name'])) {
- $name = $form_state['update_name'];
- }
-
$view->getStandardButtons($form, $form_state, 'views_ui_rearrange_form');
return $form;
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php
index a77840b..ebfbd48 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/RearrangeFilter.php
@@ -158,11 +158,15 @@ class RearrangeFilter extends ViewsFormBase {
$form['#group_renders'][$field['group']][] = $id;
$form['filters'][$id]['weight'] = array(
+ '#title' => t('Weight for @id', array('@id' => $id)),
+ '#title_display' => 'invisible',
'#type' => 'textfield',
'#default_value' => ++$count,
'#size' => 8,
);
$form['filters'][$id]['group'] = array(
+ '#title' => t('Group for @id', array('@id' => $id)),
+ '#title_display' => 'invisible',
'#type' => 'select',
'#options' => $group_options,
'#default_value' => $field['group'],
@@ -186,6 +190,8 @@ class RearrangeFilter extends ViewsFormBase {
$form['filters'][$id]['name'] = array('#markup' => $this->t('Broken field @id', array('@id' => $id)));
}
$form['filters'][$id]['removed'] = array(
+ '#title' => t('Remove @id', array('@id' => $id)),
+ '#title_display' => 'invisible',
'#type' => 'checkbox',
'#id' => 'views-removed-' . $id,
'#attributes' => array('class' => array('views-remove-checkbox')),
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ReorderDisplays.php
index 47d1fb6..512ab2a 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ReorderDisplays.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ReorderDisplays.php
@@ -98,6 +98,8 @@ class ReorderDisplays extends ViewsFormBase {
$form['displays'][$id]['removed'] = array(
'checkbox' => array(
+ '#title' => t('Remove @id', array('@id' => $id)),
+ '#title_display' => 'invisible',
'#type' => 'checkbox',
'#id' => 'display-removed-' . $id,
'#attributes' => array(
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BasicSettingsForm.php
index 99cc8c5..707db98 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
@@ -95,6 +95,7 @@ class BasicSettingsForm extends SystemConfigFormBase {
$form['live_preview']['options']['ui_show_sql_query_where'] = array(
'#type' => 'radios',
+ '#title' => t('Show SQL query'),
'#options' => array(
'above' => $this->t('Above the preview'),
'below' => $this->t('Below the preview'),
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
index f571d5f..6bd5439 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
@@ -69,6 +69,7 @@ class ViewAddFormController extends ViewFormControllerBase {
$form['name'] = array(
'#type' => 'fieldset',
+ '#title' => t('View basic information'),
'#attributes' => array('class' => array('fieldset-no-legend')),
);
@@ -118,6 +119,7 @@ class ViewAddFormController extends ViewFormControllerBase {
// properties of what the view will display.
$form['displays']['show'] = array(
'#type' => 'fieldset',
+ '#title' => t('View settings'),
'#tree' => TRUE,
'#attributes' => array('class' => array('container-inline')),
);