mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
SingleValueSearchControl: Allow to pass html as labels
This commit is contained in:
parent
d49962ac82
commit
a6507daaaf
@ -156,8 +156,8 @@ class SingleValueSearchControl extends Form
|
|||||||
public static function createSuggestions(array $groups)
|
public static function createSuggestions(array $groups)
|
||||||
{
|
{
|
||||||
$ul = new HtmlElement('ul');
|
$ul = new HtmlElement('ul');
|
||||||
foreach ($groups as $name => $entries) {
|
foreach ($groups as list($name, $entries)) {
|
||||||
if (is_string($name)) {
|
if ($name) {
|
||||||
if ($entries === false) {
|
if ($entries === false) {
|
||||||
$ul->add(new HtmlElement('li', ['class' => 'failure-message'], [
|
$ul->add(new HtmlElement('li', ['class' => 'failure-message'], [
|
||||||
new HtmlElement('em', null, t('Can\'t search:')),
|
new HtmlElement('em', null, t('Can\'t search:')),
|
||||||
@ -169,7 +169,7 @@ class SingleValueSearchControl extends Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($entries as $label => $metaData) {
|
foreach ($entries as list($label, $metaData)) {
|
||||||
$attributes = [
|
$attributes = [
|
||||||
'value' => $label,
|
'value' => $label,
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user