Skip to content

Commit

Permalink
the form status now defaults to empty string
Browse files Browse the repository at this point in the history
prevents unvalidated forms from showing up as success
  • Loading branch information
HParker committed Oct 13, 2015
1 parent f701560 commit 29d9ac5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/client/app/components/gh-validation-status-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
})
});

0 comments on commit 29d9ac5

Please sign in to comment.