1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-field.js.es6

22 Zeilen
762 B
Text

2017-10-17 15:17:53 +02:00
import { default as computed } from 'ember-addons/ember-computed-decorators';
2017-09-23 04:34:07 +02:00
export default Ember.Component.extend({
classNames: 'wizard-custom-field',
isDropdown: Ember.computed.equal('field.type', 'dropdown'),
2017-10-17 15:17:53 +02:00
disableId: Ember.computed.not('field.isNew'),
2017-10-30 07:24:51 +01:00
choicesTypes: ['translation', 'preset', 'custom'],
choicesTranslation: Ember.computed.equal('choicesType', 'translation'),
choicesPreset: Ember.computed.equal('choicesType', 'preset'),
choicesCustom: Ember.computed.equal('choicesType', 'custom'),
2017-09-23 04:34:07 +02:00
2017-10-13 15:02:34 +02:00
@computed('field.type')
isInput: (type) => type === 'text' || type === 'textarea',
@computed()
presetChoices() {
return [
{ id: 'categories', name: I18n.t('admin.wizard.field.choices_preset.categories') }
];
2017-10-30 07:24:51 +01:00
},
2017-09-23 04:34:07 +02:00
});