diff --git a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 index 2514ddce..a2df85b3 100644 --- a/assets/javascripts/discourse/components/wizard-custom-action.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-action.js.es6 @@ -56,6 +56,12 @@ export default Ember.Component.extend({ builderWizardFields(fields) { return fields.map((f) => ` w{${f.id}}`); }, + + @computed('availableFields') + categoryFields(fields) { + console.log(fields); + return fields.filter(f => f.type == 'category'); + }, @computed() builderUserFields() { diff --git a/assets/javascripts/discourse/components/wizard-custom-step.js.es6 b/assets/javascripts/discourse/components/wizard-custom-step.js.es6 index 11dac446..e8ade63a 100644 --- a/assets/javascripts/discourse/components/wizard-custom-step.js.es6 +++ b/assets/javascripts/discourse/components/wizard-custom-step.js.es6 @@ -63,7 +63,8 @@ export default Ember.Component.extend({ let stepFields = s.fields.map((f) => { return Ember.Object.create({ id: f.id, - label: `${f.id} (${s.id})` + label: `${f.id} (${s.id})`, + type: f.type }); }); fields.push(...stepFields); diff --git a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs index 9f69294c..4f9f0e2f 100644 --- a/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs +++ b/assets/javascripts/discourse/templates/components/wizard-custom-action.hbs @@ -88,7 +88,7 @@ {{i18n 'admin.wizard.action.custom_category.wizard_field'}} {{#if action.custom_category_wizard_field}} {{combo-box value=action.category_id - content=availableFields + content=categoryFields nameProperty="label" none='admin.wizard.select_field'}} {{/if}} @@ -264,7 +264,3 @@ {{/if}} - -{{#if openComposer}} - -{{/if}}