mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #5912 from HParker/form-default-class-to-none
Form default error class to none
This commit is contained in:
commit
e09cd70cd0
1 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,11 @@ import ValidationStateMixin from 'ghost/mixins/validation-state';
|
||||||
export default Ember.Component.extend(ValidationStateMixin, {
|
export default Ember.Component.extend(ValidationStateMixin, {
|
||||||
classNameBindings: ['errorClass'],
|
classNameBindings: ['errorClass'],
|
||||||
|
|
||||||
errorClass: Ember.computed('hasError', function () {
|
errorClass: Ember.computed('hasError', 'hasValidated.[]', function () {
|
||||||
return this.get('hasError') ? 'error' : 'success';
|
if (this.hasValidated.contains(this.get('property'))) {
|
||||||
|
return this.get('hasError') ? 'error' : 'success';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue