Commit 104a38a7 by Ivan Kolmycheck

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

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