mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
the form status now defaults to empty string
prevents unvalidated forms from showing up as success
This commit is contained in:
parent
f7015600b8
commit
29d9ac5c4d
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, {
|
||||
classNameBindings: ['errorClass'],
|
||||
|
||||
errorClass: Ember.computed('hasError', function () {
|
||||
return this.get('hasError') ? 'error' : 'success';
|
||||
errorClass: Ember.computed('hasError', 'hasValidated.[]', function () {
|
||||
if (this.hasValidated.contains(this.get('property'))) {
|
||||
return this.get('hasError') ? 'error' : 'success';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue