Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
21 Zeilen
523 B
JavaScript
21 Zeilen
523 B
JavaScript
import { observes } from 'ember-addons/ember-computed-decorators';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: 'wizard-custom-field',
|
|
fieldTypes: ['dropdown', 'image', 'radio', 'text', 'textarea'],
|
|
isDropdown: Ember.computed.equal('field.type', 'dropdown'),
|
|
choices: Ember.A(),
|
|
|
|
@observes('field.label')
|
|
setFieldId() {
|
|
const label = this.get('field.label');
|
|
console.log('setting id')
|
|
this.set('field.id', Ember.String.underscore(label));
|
|
},
|
|
|
|
actions: {
|
|
addChoice() {
|
|
|
|
}
|
|
}
|
|
});
|