0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-29 20:20:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs
Angus McLeod 0d94c1d8c6 various
2020-04-02 19:21:03 +11:00

114 Zeilen
Kein EOL
2,3 KiB
Handlebars

<div class="type-selector">
{{#if textEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='text'
toggle=(action 'toggleType')}}
{{/if}}
{{#if wizardEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='wizard'
toggle=(action 'toggleType')}}
{{/if}}
{{#if userFieldEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='userField'
toggle=(action 'toggleType')}}
{{/if}}
{{#if categoryEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='category'
toggle=(action 'toggleType')}}
{{/if}}
{{#if tagEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='tag'
toggle=(action 'toggleType')}}
{{/if}}
{{#if groupEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='group'
toggle=(action 'toggleType')}}
{{/if}}
{{#if userEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='user'
toggle=(action 'toggleType')}}
{{/if}}
</div>
<div class="input">
{{#if showText}}
{{input
type="text"
value=value
placeholder=(i18n textPlaceholder)}}
{{/if}}
{{#if showWizard}}
{{combo-box
value=value
content=wizardFields
onChange=(action (mut value))
options=(hash
none='admin.wizard.wizard_field'
)}}
{{/if}}
{{#if showUserField}}
{{combo-box
value=value
content=userFields
onChange=(action (mut value))
options=(hash
none='admin.wizard.user_field'
)}}
{{/if}}
{{#if showCategory}}
{{multi-select
content=categories
value=value
onChange=(action (mut value))
options=(hash
none='admin.wizard.select_category'
)}}
{{/if}}
{{#if showTag}}
{{tag-chooser
tags=value
filterable=true}}
{{/if}}
{{#if showGroup}}
{{multi-select
content=groups
value=value
onChange=(action (mut value))
options=(hash
none='admin.wizard.select_group'
)}}
{{/if}}
{{#if showUser}}
{{user-selector
topicId=topicId
includeMessageableGroups='true'
placeholderKey="composer.users_placeholder"
usernames=value
autocomplete="discourse"}}
{{/if}}
</div>