mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 01:30:23 +08:00
Removed error-block HTML class and related styles and used Bootstrap3 standard practice about errors instead
This commit is contained in:
@@ -70,17 +70,6 @@ a.desc:after {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-block {
|
|
||||||
display: none;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #a94442;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-error .error-block {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-summary {
|
.error-summary {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
background: #fdf7f7;
|
background: #fdf7f7;
|
||||||
|
|||||||
@@ -70,17 +70,6 @@ a.desc:after {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-block {
|
|
||||||
display: none;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #a94442;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-error .error-block {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-summary {
|
.error-summary {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
background: #fdf7f7;
|
background: #fdf7f7;
|
||||||
|
|||||||
@@ -70,17 +70,6 @@ a.desc:after {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-block {
|
|
||||||
display: none;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #a94442;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-error .error-block {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-summary {
|
.error-summary {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
background: #fdf7f7;
|
background: #fdf7f7;
|
||||||
|
|||||||
@@ -41,17 +41,6 @@ body {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-block {
|
|
||||||
display: none;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: #a94442;
|
|
||||||
}
|
|
||||||
|
|
||||||
.has-error .error-block {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-summary {
|
.error-summary {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
background: #fdf7f7;
|
background: #fdf7f7;
|
||||||
|
|||||||
@@ -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 #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 #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 #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 #1796: Removed `yii\base\Controller::getActionParams()` (samdark)
|
||||||
- Chg #1835: `CheckboxColumn` now renders checkboxes whose values are the corresponding data key values (qiangxue)
|
- 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)
|
- Chg #1821: Changed default values for yii\db\Connection username and password to null (cebe)
|
||||||
|
|||||||
@@ -57,7 +57,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 $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
|
* @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.
|
* merged with this property when rendering the label tag.
|
||||||
@@ -647,7 +647,7 @@ class ActiveField extends Component
|
|||||||
if (isset($this->errorOptions['class'])) {
|
if (isset($this->errorOptions['class'])) {
|
||||||
$options['error'] = '.' . implode('.', preg_split('/\s+/', $this->errorOptions['class'], -1, PREG_SPLIT_NO_EMPTY));
|
$options['error'] = '.' . implode('.', preg_split('/\s+/', $this->errorOptions['class'], -1, PREG_SPLIT_NO_EMPTY));
|
||||||
} else {
|
} else {
|
||||||
$options['error'] = isset($this->errorOptions['tag']) ? $this->errorOptions['tag'] : 'div';
|
$options['error'] = isset($this->errorOptions['tag']) ? $this->errorOptions['tag'] : 'span';
|
||||||
}
|
}
|
||||||
return $options;
|
return $options;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user