Make font feedback red on error
This commit is contained in:
parent
ff427d0354
commit
cf2c691585
2 changed files with 10 additions and 7 deletions
|
@ -50,12 +50,12 @@ class Feedback extends ElemJS {
|
||||||
this.loading = state
|
this.loading = state
|
||||||
}
|
}
|
||||||
|
|
||||||
message(content) {
|
message(content, isError) {
|
||||||
if (content) {
|
this.removeClass("form-feedback")
|
||||||
this.class("form-feedback")
|
this.removeClass("form-error")
|
||||||
} else {
|
if (content) this.class("form-feedback")
|
||||||
this.removeClass("form-feedback")
|
if(isError) this.class("form-error")
|
||||||
}
|
|
||||||
this.messageSpan.text(content)
|
this.messageSpan.text(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ class Form extends ElemJS {
|
||||||
cancel(message) {
|
cancel(message) {
|
||||||
this.processing = false
|
this.processing = false
|
||||||
feedback.setLoading(false)
|
feedback.setLoading(false)
|
||||||
feedback.message(message)
|
feedback.message(message, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
width: 100%
|
width: 100%
|
||||||
margin: -0.5em 0 -0.8em
|
margin: -0.5em 0 -0.8em
|
||||||
|
|
||||||
|
.form-error
|
||||||
|
color: red
|
||||||
|
|
||||||
@keyframes spin
|
@keyframes spin
|
||||||
0%
|
0%
|
||||||
transform: rotate(0deg)
|
transform: rotate(0deg)
|
||||||
|
|
Loading…
Reference in a new issue