2015-08-20 13:43:12 -04:00
|
|
|
import computed from 'ember-addons/ember-computed-decorators';
|
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
|
|
|
classNames: ['embed-setting'],
|
|
|
|
|
|
|
|
@computed('field')
|
|
|
|
inputId(field) { return field.dasherize(); },
|
|
|
|
|
|
|
|
@computed('field')
|
|
|
|
translationKey(field) { return `admin.embedding.${field}`; },
|
|
|
|
|
|
|
|
@computed('type')
|
|
|
|
isCheckbox(type) { return type === "checkbox"; },
|
|
|
|
|
|
|
|
@computed('value')
|
|
|
|
checked: {
|
|
|
|
get(value) { return !!value; },
|
|
|
|
set(value) {
|
2015-10-11 08:48:37 -04:00
|
|
|
this.set('value', value);
|
2015-08-20 13:43:12 -04:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|