diff --git a/apps/advanced/backend/web/css/site.css b/apps/advanced/backend/web/css/site.css index 66be560..a8508c4 100644 --- a/apps/advanced/backend/web/css/site.css +++ b/apps/advanced/backend/web/css/site.css @@ -70,17 +70,6 @@ a.desc:after { color: #999; } -.error-block { - display: none; - margin-top: 5px; - margin-bottom: 10px; - color: #a94442; -} - -.has-error .error-block { - display: block; -} - .error-summary { color: #a94442; background: #fdf7f7; diff --git a/apps/advanced/frontend/web/css/site.css b/apps/advanced/frontend/web/css/site.css index 66be560..a8508c4 100644 --- a/apps/advanced/frontend/web/css/site.css +++ b/apps/advanced/frontend/web/css/site.css @@ -70,17 +70,6 @@ a.desc:after { color: #999; } -.error-block { - display: none; - margin-top: 5px; - margin-bottom: 10px; - color: #a94442; -} - -.has-error .error-block { - display: block; -} - .error-summary { color: #a94442; background: #fdf7f7; diff --git a/apps/basic/web/css/site.css b/apps/basic/web/css/site.css index 66be560..a8508c4 100644 --- a/apps/basic/web/css/site.css +++ b/apps/basic/web/css/site.css @@ -70,17 +70,6 @@ a.desc:after { color: #999; } -.error-block { - display: none; - margin-top: 5px; - margin-bottom: 10px; - color: #a94442; -} - -.has-error .error-block { - display: block; -} - .error-summary { color: #a94442; background: #fdf7f7; diff --git a/extensions/yii/gii/assets/main.css b/extensions/yii/gii/assets/main.css index 08f7474..94d7dd2 100644 --- a/extensions/yii/gii/assets/main.css +++ b/extensions/yii/gii/assets/main.css @@ -41,17 +41,6 @@ body { display: none; } -.error-block { - display: none; - margin-top: 5px; - margin-bottom: 10px; - color: #a94442; -} - -.has-error .error-block { - display: block; -} - .error-summary { color: #a94442; background: #fdf7f7; diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index c0294e2..b03ebe7 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -65,7 +65,6 @@ Yii Framework 2 Change Log - Chg #1586: `QueryBuilder::buildLikeCondition()` will now escape special characters and use percentage characters by default (qiangxue) - Chg #1610: `Html::activeCheckboxList()` and `Html::activeRadioList()` will submit an empty string if no checkbox/radio is selected (qiangxue) - Chg #1643: Added default value for `Captcha::options` (qiangxue) -- Chg #1647: Changed the default CSS class of error block to be `error-block` (qiangxue) - Chg #1796: Removed `yii\base\Controller::getActionParams()` (samdark) - Chg #1835: `CheckboxColumn` now renders checkboxes whose values are the corresponding data key values (qiangxue) - Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe) diff --git a/framework/yii/widgets/ActiveField.php b/framework/yii/widgets/ActiveField.php index b46064a..13e510e 100644 --- a/framework/yii/widgets/ActiveField.php +++ b/framework/yii/widgets/ActiveField.php @@ -57,7 +57,7 @@ class ActiveField extends Component * * - tag: the tag name of the container element. Defaults to "div". */ - public $errorOptions = ['class' => 'error-block']; + public $errorOptions = ['class' => 'help-block']; /** * @var array the default options for the label tags. The parameter passed to [[label()]] will be * merged with this property when rendering the label tag. @@ -647,7 +647,7 @@ class ActiveField extends Component if (isset($this->errorOptions['class'])) { $options['error'] = '.' . implode('.', preg_split('/\s+/', $this->errorOptions['class'], -1, PREG_SPLIT_NO_EMPTY)); } else { - $options['error'] = isset($this->errorOptions['tag']) ? $this->errorOptions['tag'] : 'div'; + $options['error'] = isset($this->errorOptions['tag']) ? $this->errorOptions['tag'] : 'span'; } return $options; } else {