mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
46b311b561
refs https://github.com/TryGhost/Team/issues/792 - updates product benefit to use `name` instead of `label` attribute for benefit text - updates model/serializer/validator to correctly handle benefit attributes - added `+` button for adding new labels as the enter behavior is closing the popup(needs fix)
24 lines
547 B
JavaScript
24 lines
547 B
JavaScript
import EmberObject from '@ember/object';
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
import {computed} from '@ember/object';
|
|
import {isBlank} from '@ember/utils';
|
|
|
|
export default EmberObject.extend(ValidationEngine, {
|
|
name: '',
|
|
isNew: false,
|
|
|
|
validationType: 'productBenefitItem',
|
|
|
|
isComplete: computed('name', function () {
|
|
let {name} = this;
|
|
|
|
return !isBlank(name);
|
|
}),
|
|
|
|
isBlank: computed('name', function () {
|
|
let {name} = this;
|
|
|
|
return isBlank(name);
|
|
})
|
|
});
|