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

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

Datei anzeigen

@ -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);

Datei anzeigen

@ -88,7 +88,7 @@
<span>{{i18n 'admin.wizard.action.custom_category.wizard_field'}}</span>
{{#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 @@
</div>
</div>
{{/if}}
{{#if openComposer}}
{{/if}}