0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-input.js.es6
Angus McLeod a09376e645 various
2017-10-30 14:24:51 +08:00

19 Zeilen
436 B
JavaScript

export default Ember.Component.extend({
noneKey: 'admin.wizard.select_field',
noneValue: 'admin.wizard.none',
inputKey: 'admin.wizard.key',
inputValue: 'admin.wizard.value',
actions: {
add() {
if (!this.get('inputs')) {
this.set('inputs', Ember.A());
}
this.get('inputs').pushObject(Ember.Object.create());
},
remove(input) {
this.get('inputs').removeObject(input);
}
}
});