mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 02:56:26 -05:00
24 lines
521 B
Text
24 lines
521 B
Text
|
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) {
|
||
|
this.set('value', value);
|
||
|
return value;
|
||
|
}
|
||
|
}
|
||
|
});
|