Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
FIX: limit wizard fields to category fields for custom categories
Dieser Commit ist enthalten in:
Ursprung
2f02ca0fb2
Commit
9880bd780e
3 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen
|
@ -57,6 +57,12 @@ export default Ember.Component.extend({
|
||||||
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() {
|
||||||
const noTheme = PROFILE_FIELDS.filter((f) => f !== 'theme_id');
|
const noTheme = PROFILE_FIELDS.filter((f) => f !== 'theme_id');
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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}}
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren