SingleValueSearchControl: Add failure message for empty results
This commit is contained in:
parent
a6507daaaf
commit
0d35a1774d
|
@ -164,6 +164,12 @@ class SingleValueSearchControl extends Form
|
||||||
$name
|
$name
|
||||||
]));
|
]));
|
||||||
continue;
|
continue;
|
||||||
|
} elseif (empty($entries)) {
|
||||||
|
$ul->add(new HtmlElement('li', ['class' => 'failure-message'], [
|
||||||
|
new HtmlElement('em', null, t('No results:')),
|
||||||
|
$name
|
||||||
|
]));
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
$ul->add(new HtmlElement('li', ['class' => Suggestions::SUGGESTION_TITLE_CLASS], $name));
|
$ul->add(new HtmlElement('li', ['class' => Suggestions::SUGGESTION_TITLE_CLASS], $name));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue