Merge pull request #983 from johnberberich/fix-help-block-validation

Apply validation state colors to form group help blocks
pull/2479/head
Abdullah Almsaeed 2016-03-23 11:49:13 -04:00
commit bdec7573df
4 changed files with 22 additions and 1 deletions

View File

@ -33,6 +33,9 @@
border-color: @green; border-color: @green;
box-shadow: none; box-shadow: none;
} }
.help-block {
color: @green;
}
} }
&.has-warning { &.has-warning {
@ -43,6 +46,9 @@
border-color: @yellow; border-color: @yellow;
box-shadow: none; box-shadow: none;
} }
.help-block {
color: @yellow;
}
} }
&.has-error { &.has-error {
@ -53,6 +59,9 @@
border-color: @red; border-color: @red;
box-shadow: none; box-shadow: none;
} }
.help-block {
color: @red;
}
} }
} }

View File

@ -1260,6 +1260,9 @@ a:focus {
border-color: #00a65a; border-color: #00a65a;
box-shadow: none; box-shadow: none;
} }
.form-group.has-success .help-block {
color: #00a65a;
}
.form-group.has-warning label { .form-group.has-warning label {
color: #f39c12; color: #f39c12;
} }
@ -1267,6 +1270,9 @@ a:focus {
border-color: #f39c12; border-color: #f39c12;
box-shadow: none; box-shadow: none;
} }
.form-group.has-warning .help-block {
color: #f39c12;
}
.form-group.has-error label { .form-group.has-error label {
color: #dd4b39; color: #dd4b39;
} }
@ -1274,6 +1280,9 @@ a:focus {
border-color: #dd4b39; border-color: #dd4b39;
box-shadow: none; box-shadow: none;
} }
.form-group.has-error .help-block {
color: #dd4b39;
}
/* Input group */ /* Input group */
.input-group .input-group-addon { .input-group .input-group-addon {
border-radius: 0; border-radius: 0;

File diff suppressed because one or more lines are too long

View File

@ -746,16 +746,19 @@
<div class="form-group has-success"> <div class="form-group has-success">
<label class="control-label" for="inputSuccess"><i class="fa fa-check"></i> Input with success</label> <label class="control-label" for="inputSuccess"><i class="fa fa-check"></i> Input with success</label>
<input type="text" class="form-control" id="inputSuccess" placeholder="Enter ..."> <input type="text" class="form-control" id="inputSuccess" placeholder="Enter ...">
<span class="help-block">Help block with success</span>
</div> </div>
<div class="form-group has-warning"> <div class="form-group has-warning">
<label class="control-label" for="inputWarning"><i class="fa fa-bell-o"></i> Input with <label class="control-label" for="inputWarning"><i class="fa fa-bell-o"></i> Input with
warning</label> warning</label>
<input type="text" class="form-control" id="inputWarning" placeholder="Enter ..."> <input type="text" class="form-control" id="inputWarning" placeholder="Enter ...">
<span class="help-block">Help block with warning</span>
</div> </div>
<div class="form-group has-error"> <div class="form-group has-error">
<label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> Input with <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> Input with
error</label> error</label>
<input type="text" class="form-control" id="inputError" placeholder="Enter ..."> <input type="text" class="form-control" id="inputError" placeholder="Enter ...">
<span class="help-block">Help block with error</span>
</div> </div>
<!-- checkbox --> <!-- checkbox -->