Skip to content

Commit

Permalink
FilterEditor: new helper for text inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Gelf committed Nov 15, 2014
1 parent 1c5cba9 commit 0e4a857
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions library/Icinga/Web/Widget/FilterEditor.php
Expand Up @@ -286,6 +286,19 @@ protected function renderFilter($filter, $level = 0)
return $html;
}

protected function text(Filter $filter = null)
{
$value = $filter === null ? '' : $filter->getExpression();
if (is_array($value)) {
$value = '(' . implode('|', $value) . ')';
}
return sprintf(
'<input type="text" name="%s" value="%s" />',
$this->elementId('value', $filter),
$value
);
}

protected function renderNewFilter()
{
$html = $this->selectColumn()
Expand Down

0 comments on commit 0e4a857

Please sign in to comment.