Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +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
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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}}
|
||||
|
|
Laden …
In neuem Issue referenzieren