Skip to content

Commit ac33d11

Browse files
committed
fixed #220
1 parent 20fc127 commit ac33d11

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Yii2 multiple input change log
22
==============================
33

4-
2.16.0 (in development)
4+
2.15.1 (in development)
55
=======================
6+
- #220 fixed error message for clientValidation and ajaxValidation (antkaz)
67

78
2.15.0
89
=======================
9-
- #217 added `layoutConfig` property for the ListRenderer
10+
- #217 added `layoutConfig` property for the ListRenderer (antkaz)
1011

1112
2.14.0
1213
======

src/renderers/ListRenderer.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public function renderCellContent($column, $index)
194194

195195
$hasError = false;
196196
$error = '';
197+
$wrapperOptions = [];
197198
$layoutConfig = array_merge([
198199
'offsetClass' => 'col-sm-offset-3',
199200
'labelClass' => 'col-sm-3',
@@ -208,18 +209,14 @@ public function renderCellContent($column, $index)
208209
$hasError = !empty($error);
209210
}
210211

211-
$wrapperOptions = [
212-
'class' => 'field-' . $id
213-
];
214-
215212
if ($hasError) {
216213
Html::addCssClass($wrapperOptions, 'has-error');
217214
}
218215

219216
Html::addCssClass($wrapperOptions, $layoutConfig['wrapperClass']);
220217

221218
$content = Html::beginTag('div', [
222-
'class' => 'form-group list-cell__' . $column->name . ($hasError ? ' has-error' : '')
219+
'class' => "form-group field-$id list-cell__$column->name" . ($hasError ? ' has-error' : '')
223220
]);
224221

225222
if (empty($column->title)) {

0 commit comments

Comments
 (0)