1
0
Fork 0

FIX: limit wizard fields to category fields for custom categories

Dieser Commit ist enthalten in:
Angus McLeod 2019-10-15 16:08:49 +11:00
Ursprung 2f02ca0fb2
Commit 9880bd780e
3 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -56,6 +56,12 @@ export default Ember.Component.extend({
builderWizardFields(fields) { builderWizardFields(fields) {
return fields.map((f) => ` w{${f.id}}`); return fields.map((f) => ` w{${f.id}}`);
}, },
@computed('availableFields')
categoryFields(fields) {
console.log(fields);
return fields.filter(f => f.type == 'category');
},
@computed() @computed()
builderUserFields() { builderUserFields() {

Datei anzeigen

@ -63,7 +63,8 @@ export default Ember.Component.extend({
let stepFields = s.fields.map((f) => { let stepFields = s.fields.map((f) => {
return Ember.Object.create({ return Ember.Object.create({
id: f.id, id: f.id,
label: `${f.id} (${s.id})` label: `${f.id} (${s.id})`,
type: f.type
}); });
}); });
fields.push(...stepFields); fields.push(...stepFields);

Datei anzeigen

@ -88,7 +88,7 @@
<span>{{i18n 'admin.wizard.action.custom_category.wizard_field'}}</span> <span>{{i18n 'admin.wizard.action.custom_category.wizard_field'}}</span>
{{#if action.custom_category_wizard_field}} {{#if action.custom_category_wizard_field}}
{{combo-box value=action.category_id {{combo-box value=action.category_id
content=availableFields content=categoryFields
nameProperty="label" nameProperty="label"
none='admin.wizard.select_field'}} none='admin.wizard.select_field'}}
{{/if}} {{/if}}
@ -264,7 +264,3 @@
</div> </div>
</div> </div>
{{/if}} {{/if}}
{{#if openComposer}}
{{/if}}