Skip to content

Commit 4745b07

Browse files
committed
bug #38 Fixed the styles of the form fields when the form contains errors (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Fixed the styles of the form fields when the form contains errors This fixes #37 ![form_field_errors](https://cloud.githubusercontent.com/assets/73419/7230732/eb3bfdb0-e770-11e4-8ea1-ed730b2e3979.png) Commits ------- bb57946 Fixed the styles of the form fields when the form contains errors
2 parents 0c0e353 + bb57946 commit 4745b07

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

app/Resources/assets/scss/main.scss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ code {
2929
// Text labels
3030
.text-danger,
3131
.text-danger:hover {
32-
color: #E74C3C;
32+
color: $brand-danger;
3333
}
3434

3535
//
@@ -126,9 +126,19 @@ footer {
126126
// --------------------------------------------------
127127

128128
// Form errors
129-
.form-error {
129+
.form-group.has-error .form-control {
130+
border-color: $brand-danger;
131+
}
132+
.form-group.has-error .control-label {
133+
color: $brand-danger;
134+
}
135+
.form-group.has-error .help-block {
136+
background-color: $brand-danger;
137+
color: #FFF;
138+
font-size: $font-size-base;
139+
padding: 1em;
140+
130141
ul {
131-
color: #FFF;
132142
margin-bottom: 0;
133143
}
134144
}

web/css/app.css

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6990,7 +6990,7 @@ code {
69906990

69916991
.text-danger,
69926992
.text-danger:hover {
6993-
color: #E74C3C; }
6993+
color: #e74c3c; }
69946994

69956995
i {
69966996
margin-right: .25em; }
@@ -7039,9 +7039,19 @@ footer {
70397039
margin-bottom: 2em;
70407040
padding: 0; }
70417041

7042-
.form-error ul {
7042+
.form-group.has-error .form-control {
7043+
border-color: #e74c3c; }
7044+
7045+
.form-group.has-error .control-label {
7046+
color: #e74c3c; }
7047+
7048+
.form-group.has-error .help-block {
7049+
background-color: #e74c3c;
70437050
color: #FFF;
7044-
margin-bottom: 0; }
7051+
font-size: 15px;
7052+
padding: 1em; }
7053+
.form-group.has-error .help-block ul {
7054+
margin-bottom: 0; }
70457055

70467056
body#homepage {
70477057
text-align: center; }

0 commit comments

Comments
 (0)