mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Fixes #7008: Removed extra white space in GridView filter cell
This commit is contained in:
committed by
Alexander Makarov
parent
754660ef7b
commit
dec4a4f239
@ -16,6 +16,7 @@ Yii Framework 2 Change Log
|
||||
- Enh #6852: Added `yii\helpers\BaseHtmlPurifier::helpers()` in order to be able to configure `HtmlPurifier` helper globally via subclassing (Alex-Code)
|
||||
- Enh #6882: Added `yii\web\ErrorHandler::getTypeUrl()` in order to allow providing custom types/classes/methods URLs for subclasses (brandonkelly)
|
||||
- Enh #6896: Added `yii\log\FileTarget::$enableRotation` to allow disabling log rotation when external tools are configured for this (cebe)
|
||||
- Enh #7008: Removed extra white space in GridView filter cell (uran1980)
|
||||
- Enh #7051: Added support for preventing swapping values between different cookies (pavimus, qiangxue)
|
||||
- Chg #5690: adjusted paths in message config generated by `yii message/config` to reflect directory structure better (mikehaertl, samdark)
|
||||
- Chg #6661: Hyperlinks that are enclosed within an exist form will use the same form for submission if they specify both of the `href` and `data-method` attributes (qiangxue)
|
||||
|
||||
@ -159,15 +159,15 @@ class DataColumn extends Column
|
||||
if ($this->filter !== false && $model instanceof Model && $this->attribute !== null && $model->isAttributeActive($this->attribute)) {
|
||||
if ($model->hasErrors($this->attribute)) {
|
||||
Html::addCssClass($this->filterOptions, 'has-error');
|
||||
$error = Html::error($model, $this->attribute, $this->grid->filterErrorOptions);
|
||||
$error = ' ' . Html::error($model, $this->attribute, $this->grid->filterErrorOptions);
|
||||
} else {
|
||||
$error = '';
|
||||
}
|
||||
if (is_array($this->filter)) {
|
||||
$options = array_merge(['prompt' => ''], $this->filterInputOptions);
|
||||
return Html::activeDropDownList($model, $this->attribute, $this->filter, $options) . ' ' . $error;
|
||||
return Html::activeDropDownList($model, $this->attribute, $this->filter, $options) . $error;
|
||||
} else {
|
||||
return Html::activeTextInput($model, $this->attribute, $this->filterInputOptions) . ' ' . $error;
|
||||
return Html::activeTextInput($model, $this->attribute, $this->filterInputOptions) . $error;
|
||||
}
|
||||
} else {
|
||||
return parent::renderFilterCellContent();
|
||||
|
||||
Reference in New Issue
Block a user