Commit 27658e56 by Qiang Xue

Fixes #1647: Changed the default CSS class of error block to be `error-block`

parent 978f8ec2
...@@ -13,6 +13,7 @@ body { ...@@ -13,6 +13,7 @@ body {
text-align: center; text-align: center;
background-color: transparent; background-color: transparent;
} }
.jumbotron .btn { .jumbotron .btn {
font-size: 21px; font-size: 21px;
padding: 14px 24px; padding: 14px 24px;
...@@ -35,17 +36,49 @@ a.asc:after, a.desc:after { ...@@ -35,17 +36,49 @@ a.asc:after, a.desc:after {
padding-left: 5px; padding-left: 5px;
} }
a.asc:after { content: /*"\e113"*/"\e151"; } a.asc:after {
a.desc:after { content: /*"\e114"*/"\e152"; } content: /*"\e113"*/ "\e151";
}
a.desc:after {
content: /*"\e114"*/ "\e152";
}
.sort-numerical a.asc:after {
content: "\e153";
}
.sort-numerical a.desc:after {
content: "\e154";
}
.sort-ordinal a.asc:after {
content: "\e155";
}
.sort-ordinal a.desc:after {
content: "\e156";
}
.hint-block {
display: block;
margin-top: 5px;
color: #999;
}
.sort-numerical a.asc:after { content: "\e153"; } .error-block {
.sort-numerical a.desc:after { content: "\e154"; } display: none;
margin-top: 5px;
margin-bottom: 10px;
color: #a94442;
}
.sort-ordinal a.asc:after { content: "\e155"; } .has-error .error-block {
.sort-ordinal a.desc:after { content: "\e156"; } display: block;
}
.error-summary { .error-summary {
color: #b94a48; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
border-left: 3px solid #eed3d7; border-left: 3px solid #eed3d7;
padding: 10px 20px; padding: 10px 20px;
......
...@@ -13,6 +13,7 @@ body { ...@@ -13,6 +13,7 @@ body {
text-align: center; text-align: center;
background-color: transparent; background-color: transparent;
} }
.jumbotron .btn { .jumbotron .btn {
font-size: 21px; font-size: 21px;
padding: 14px 24px; padding: 14px 24px;
...@@ -35,17 +36,49 @@ a.asc:after, a.desc:after { ...@@ -35,17 +36,49 @@ a.asc:after, a.desc:after {
padding-left: 5px; padding-left: 5px;
} }
a.asc:after { content: /*"\e113"*/"\e151"; } a.asc:after {
a.desc:after { content: /*"\e114"*/"\e152"; } content: /*"\e113"*/ "\e151";
}
a.desc:after {
content: /*"\e114"*/ "\e152";
}
.sort-numerical a.asc:after {
content: "\e153";
}
.sort-numerical a.desc:after {
content: "\e154";
}
.sort-ordinal a.asc:after {
content: "\e155";
}
.sort-ordinal a.desc:after {
content: "\e156";
}
.hint-block {
display: block;
margin-top: 5px;
color: #999;
}
.sort-numerical a.asc:after { content: "\e153"; } .error-block {
.sort-numerical a.desc:after { content: "\e154"; } display: none;
margin-top: 5px;
margin-bottom: 10px;
color: #a94442;
}
.sort-ordinal a.asc:after { content: "\e155"; } .has-error .error-block {
.sort-ordinal a.desc:after { content: "\e156"; } display: block;
}
.error-summary { .error-summary {
color: #b94a48; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
border-left: 3px solid #eed3d7; border-left: 3px solid #eed3d7;
padding: 10px 20px; padding: 10px 20px;
......
...@@ -36,17 +36,49 @@ a.asc:after, a.desc:after { ...@@ -36,17 +36,49 @@ a.asc:after, a.desc:after {
padding-left: 5px; padding-left: 5px;
} }
a.asc:after { content: /*"\e113"*/"\e151"; } a.asc:after {
a.desc:after { content: /*"\e114"*/"\e152"; } content: /*"\e113"*/ "\e151";
}
a.desc:after {
content: /*"\e114"*/ "\e152";
}
.sort-numerical a.asc:after {
content: "\e153";
}
.sort-numerical a.desc:after {
content: "\e154";
}
.sort-numerical a.asc:after { content: "\e153"; } .sort-ordinal a.asc:after {
.sort-numerical a.desc:after { content: "\e154"; } content: "\e155";
}
.sort-ordinal a.asc:after { content: "\e155"; } .sort-ordinal a.desc:after {
.sort-ordinal a.desc:after { content: "\e156"; } content: "\e156";
}
.hint-block {
display: block;
margin-top: 5px;
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: #b94a48; color: #a94442;
background: #fdf7f7; background: #fdf7f7;
border-left: 3px solid #eed3d7; border-left: 3px solid #eed3d7;
padding: 10px 20px; padding: 10px 20px;
......
...@@ -41,6 +41,25 @@ body { ...@@ -41,6 +41,25 @@ 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 {
color: #a94442;
background: #fdf7f7;
border-left: 3px solid #eed3d7;
padding: 10px 20px;
margin: 0 0 15px 0;
}
.default-view .sticky-value { .default-view .sticky-value {
padding: 6px 12px; padding: 6px 12px;
background: lightyellow; background: lightyellow;
......
...@@ -54,6 +54,7 @@ Yii Framework 2 Change Log ...@@ -54,6 +54,7 @@ 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: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue) - Chg: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue)
- Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue) - Chg: Renamed `ActiveRecord::getPopulatedRelations()` to `getRelatedRecords()` (qiangxue)
- Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue) - Chg: Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator` (qiangxue)
......
...@@ -44,7 +44,7 @@ class ActiveField extends Component ...@@ -44,7 +44,7 @@ class ActiveField extends Component
* @var string the template that is used to arrange the label, the input field, the error message and the hint text. * @var string the template that is used to arrange the label, the input field, the error message and the hint text.
* The following tokens will be replaced when [[render()]] is called: `{label}`, `{input}`, `{error}` and `{hint}`. * The following tokens will be replaced when [[render()]] is called: `{label}`, `{input}`, `{error}` and `{hint}`.
*/ */
public $template = "{label}\n{input}\n{error}\n{hint}"; public $template = "{label}\n{input}\n{hint}\n{error}";
/** /**
* @var array the default options for the input tags. The parameter passed to individual input methods * @var array the default options for the input tags. The parameter passed to individual input methods
* (e.g. [[textInput()]]) will be merged with this property when rendering the input tag. * (e.g. [[textInput()]]) will be merged with this property when rendering the input tag.
...@@ -57,7 +57,7 @@ class ActiveField extends Component ...@@ -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' => 'help-block']; public $errorOptions = ['class' => 'error-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.
......
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