0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-custom-input-chooser.hbs

91 Zeilen
1,7 KiB
Handlebars

2020-03-21 18:30:11 +01:00
<div class="type-selector">
{{input-type-toggle
activeType=activeType
type='text'
toggle=(action 'toggleType')}}
{{#if wizardEnabled}}
{{input-type-toggle
activeType=activeType
type='wizard'
toggle=(action 'toggleType')}}
{{/if}}
{{#if userEnabled}}
{{input-type-toggle
activeType=activeType
type='user'
toggle=(action 'toggleType')}}
{{/if}}
2020-03-23 06:41:04 +01:00
{{#if categoryEnabled}}
{{input-type-toggle
activeType=activeType
type='category'
toggle=(action 'toggleType')}}
{{/if}}
{{#if tagEnabled}}
{{input-type-toggle
activeType=activeType
type='tag'
toggle=(action 'toggleType')}}
{{/if}}
{{#if groupEnabled}}
{{input-type-toggle
activeType=activeType
type='group'
toggle=(action 'toggleType')}}
{{/if}}
2020-03-21 18:30:11 +01:00
</div>
<div class="input">
{{#if showText}}
{{input
type="text"
value=value
placeholder=(i18n textPlaceholder)}}
{{/if}}
{{#if showWizard}}
{{combo-box
value=value
content=wizardFields
2020-03-23 06:41:04 +01:00
onChange=(action (mut value))
2020-03-21 18:30:11 +01:00
options=(hash
none='admin.wizard.wizard_field'
)}}
{{/if}}
{{#if showUser}}
{{combo-box
value=value
content=userFields
2020-03-23 06:41:04 +01:00
onChange=(action (mut value))
2020-03-21 18:30:11 +01:00
options=(hash
none='admin.wizard.user_field'
)}}
{{/if}}
2020-03-23 06:41:04 +01:00
{{#if showCategory}}
{{category-chooser value=value}}
{{/if}}
{{#if showTag}}
{{tag-chooser
tags=value
filterable=true
allowCreate=true}}
{{/if}}
{{#if showGroup}}
{{combo-box
content=site.groups
value=value
onChange=(action (mut value))
options=(hash
none='admin.wizard.select_group'
)}}
{{/if}}
2020-03-21 18:30:11 +01:00
</div>