Commit 7ae4695d by Qiang Xue

Fixes #1856: The default CSS class for hint generated by `ActiveField` is changed to `help-block`

parent f5e1fbc5
...@@ -76,12 +76,6 @@ a.desc:after { ...@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap; white-space: nowrap;
} }
.hint-block {
display: block;
margin-top: 5px;
color: #999;
}
.error-summary { .error-summary {
color: #a94442; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
......
...@@ -76,12 +76,6 @@ a.desc:after { ...@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap; white-space: nowrap;
} }
.hint-block {
display: block;
margin-top: 5px;
color: #999;
}
.error-summary { .error-summary {
color: #a94442; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
......
...@@ -76,12 +76,6 @@ a.desc:after { ...@@ -76,12 +76,6 @@ a.desc:after {
white-space: nowrap; white-space: nowrap;
} }
.hint-block {
display: block;
margin-top: 5px;
color: #999;
}
.error-summary { .error-summary {
color: #a94442; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
......
...@@ -107,8 +107,8 @@ or ...@@ -107,8 +107,8 @@ or
<?= Html::activeLabel($model, 'username', ['label' => 'name']) ?> <?= Html::activeLabel($model, 'username', ['label' => 'name']) ?>
<?= Html::activeTextInput($model, 'username') ?> <?= Html::activeTextInput($model, 'username') ?>
<?= Html::error($model, 'username') ?>
<div class="hint-block">Please enter your name</div> <div class="hint-block">Please enter your name</div>
<?= Html::error($model, 'username') ?>
``` ```
If you want to use one of HTML5 fields you may specify input type directly like the following: If you want to use one of HTML5 fields you may specify input type directly like the following:
......
...@@ -121,6 +121,7 @@ Yii Framework 2 Change Log ...@@ -121,6 +121,7 @@ Yii Framework 2 Change Log
- Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe) - Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe)
- Chg #1844: `Response::sendFile()` and other file sending methods will not send the response (qiangxue) - Chg #1844: `Response::sendFile()` and other file sending methods will not send the response (qiangxue)
- Chg #1852: DbConnection::tablePrefix default value now 'tbl_' (creocoder) - Chg #1852: DbConnection::tablePrefix default value now 'tbl_' (creocoder)
- Chg #1856: The default CSS class for hint generated by `ActiveField` is changed to `help-block` (qiangxue, crocoder)
- Chg #1958: `beforeSubmit` in `yii.activeform` is now executed after validation and before form submission (6pblcb) - Chg #1958: `beforeSubmit` in `yii.activeform` is now executed after validation and before form submission (6pblcb)
- Chg #2025: Removed ability to declare scopes in ActiveRecord (samdark) - Chg #2025: Removed ability to declare scopes in ActiveRecord (samdark)
- Chg #2043: - Chg #2043:
......
...@@ -70,7 +70,7 @@ class ActiveField extends Component ...@@ -70,7 +70,7 @@ class ActiveField extends Component
* *
* - tag: the tag name of the container element. Defaults to "div". * - tag: the tag name of the container element. Defaults to "div".
*/ */
public $hintOptions = ['class' => 'hint-block']; public $hintOptions = ['class' => 'help-block'];
/** /**
* @var boolean whether to enable client-side data validation. * @var boolean whether to enable client-side data validation.
* If not set, it will take the value of [[ActiveForm::enableClientValidation]]. * If not set, it will take the value of [[ActiveForm::enableClientValidation]].
......
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