Commit 315c2a84 authored by alexpott's avatar alexpott

Issue #2215473 by Lendude, speely, pjonckiere: Filter description not visible in exposed form

parent ec9a3ec2
......@@ -137,6 +137,9 @@ public function testExposedFormRender() {
$expected_action = _url($view->display_handler->getUrl());
$this->assertFieldByXPath('//form/@action', $expected_action, 'The expected value for the action attribute was found.');
// Make sure the description is shown.
$result = $this->xpath('//form//div[contains(@id, :id) and normalize-space(text())=:description]', array(':id' => 'edit-type--description', ':description' => t('Exposed description')));
$this->assertEqual(count($result), 1, 'Filter description was found.');
}
/**
......
......@@ -29,6 +29,7 @@ display:
label: 'Content: Type'
operator_id: type_op
reduce: false
description: 'Exposed description'
exposed: true
field: type
id: type
......
......@@ -1014,6 +1014,9 @@ function template_preprocess_views_exposed_form(&$variables) {
if (!empty($info['label'])) {
$form[$info['value']]['#title'] = $info['label'];
}
if (!empty($info['description'])) {
$form[$info['value']]['#description'] = $info['description'];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment