diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index 10e2a37..af30472 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -202,6 +202,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { '#title' => !$exposed ? $this->t('Min') : $this->exposedInfo()['label'], '#size' => 30, '#default_value' => $this->value['min'], + '#description' => !$exposed ? '' : $this->exposedInfo()['description'] ); $form['value']['max'] = array( '#type' => 'textfield', diff --git a/core/modules/views_ui/src/Tests/FilterNumericWebTest.php b/core/modules/views_ui/src/Tests/FilterNumericWebTest.php index fc34b26..f057d5a 100644 --- a/core/modules/views_ui/src/Tests/FilterNumericWebTest.php +++ b/core/modules/views_ui/src/Tests/FilterNumericWebTest.php @@ -98,6 +98,7 @@ public function testFilterNumericUI() { $this->drupalGet('admin/structure/views/nojs/handler/test_view/default/filter/age'); $edit = array(); $edit['options[expose][label]'] = 'Age between'; + $edit['options[expose][description]'] = 'Description of the exposed filter'; $edit['options[operator]'] = 'between'; $edit['options[value][min]'] = 26; $edit['options[value][max]'] = 28; @@ -113,6 +114,8 @@ public function testFilterNumericUI() { $this->assertText('George'); $this->assertNoText('Meredith'); $this->assertNoText('John'); + // Test if the description is shown. + $this->assertText('Description of the exposed filter'); } }