Browse Source

Removed error-block HTML class and related styles and used Bootstrap3 standard practice about errors instead

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
4609a94dbf
  1. 11
      apps/advanced/backend/web/css/site.css
  2. 11
      apps/advanced/frontend/web/css/site.css
  3. 11
      apps/basic/web/css/site.css
  4. 11
      extensions/yii/gii/assets/main.css
  5. 1
      framework/CHANGELOG.md
  6. 4
      framework/yii/widgets/ActiveField.php

11
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;

11
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;

11
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;

11
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;

1
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)

4
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 {

Loading…
Cancel
Save