From 62cf4b50e56f6acf3e777148e4b4590dbeb2aa41 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Tue, 9 Jan 2018 11:51:06 +0000 Subject: [PATCH] Issue #2904084 by Ruslan P, Venkatesh Rajan.J: Confusing title for "Boolean" field in "Manage form display" --- .../Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php | 2 +- core/modules/field/src/Tests/Boolean/BooleanFieldTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php index 1d4a202f00..660a06460e 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/BooleanCheckboxWidget.php @@ -35,7 +35,7 @@ public static function defaultSettings() { public function settingsForm(array $form, FormStateInterface $form_state) { $element['display_label'] = [ '#type' => 'checkbox', - '#title' => t('Use field label instead of the "On label" as label'), + '#title' => t('Use field label instead of the "On" label as the label.'), '#default_value' => $this->getSetting('display_label'), '#weight' => -1, ]; diff --git a/core/modules/field/src/Tests/Boolean/BooleanFieldTest.php b/core/modules/field/src/Tests/Boolean/BooleanFieldTest.php index 6fc6c6dc9f..7e4d2ff7d2 100644 --- a/core/modules/field/src/Tests/Boolean/BooleanFieldTest.php +++ b/core/modules/field/src/Tests/Boolean/BooleanFieldTest.php @@ -153,7 +153,7 @@ public function testBooleanField() { $this->drupalPostAjaxForm(NULL, [], $field_name . "_settings_edit"); $this->assertText( - 'Use field label instead of the "On label" as label', + 'Use field label instead of the "On" label as the label.', t('Display setting checkbox available.') ); @@ -169,7 +169,7 @@ public function testBooleanField() { $this->drupalPostAjaxForm(NULL, [], $field_name . "_settings_edit"); $this->assertText( - 'Use field label instead of the "On label" as label', + 'Use field label instead of the "On" label as the label.', t('Display setting checkbox is available') ); $this->assertFieldByXPath( -- GitLab