Commit 104a38a7 by Ivan Kolmycheck

Issue #3154 - DataColumn checkForFilterErrors() now use Html::addCssClass

parent 3705f177
...@@ -188,16 +188,13 @@ class DataColumn extends Column ...@@ -188,16 +188,13 @@ class DataColumn extends Column
*/ */
public function checkForFilterErrors() public function checkForFilterErrors()
{ {
if ($this->filter !== false && $this->grid->filterModel instanceof Model && if ($this->filter !== false &&
$this->attribute !== null && $this->grid->filterModel->isAttributeActive($this->attribute) && $this->grid->filterModel instanceof Model &&
ArrayHelper::keyExists($this->attribute, $this->grid->filterModel->errors)) $this->attribute !== null &&
{ $this->grid->filterModel->isAttributeActive($this->attribute) &&
$filterClass = ArrayHelper::getValue($this->filterOptions, 'class', ''); ArrayHelper::keyExists($this->attribute, $this->grid->filterModel->errors)
if ($filterClass) ) {
{ Html::addCssClass($this->filterOptions, 'has-error');
$filterClass .= ' ';
}
$this->filterOptions['class'] = $filterClass . 'has-error';
} }
} }
......
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