0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-12-02 05:21:10 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs

114 Zeilen
2,3 KiB
Handlebars

2020-03-21 18:30:11 +01:00
<div class="type-selector">
2020-04-01 07:03:26 +02:00
{{#if textEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-24 10:35:46 +01:00
activeType=activeType
type='text'
toggle=(action 'toggleType')}}
2020-04-01 07:03:26 +02:00
{{/if}}
2020-03-21 18:30:11 +01:00
{{#if wizardEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-21 18:30:11 +01:00
activeType=activeType
type='wizard'
toggle=(action 'toggleType')}}
{{/if}}
2020-04-02 10:21:03 +02:00
{{#if userFieldEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-21 18:30:11 +01:00
activeType=activeType
2020-04-02 10:21:03 +02:00
type='userField'
2020-03-21 18:30:11 +01:00
toggle=(action 'toggleType')}}
{{/if}}
2020-03-23 06:41:04 +01:00
{{#if categoryEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-23 06:41:04 +01:00
activeType=activeType
type='category'
toggle=(action 'toggleType')}}
{{/if}}
{{#if tagEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-23 06:41:04 +01:00
activeType=activeType
type='tag'
toggle=(action 'toggleType')}}
{{/if}}
{{#if groupEnabled}}
2020-04-01 12:58:30 +02:00
{{wizard-mapper-selector-type
2020-03-23 06:41:04 +01:00
activeType=activeType
type='group'
toggle=(action 'toggleType')}}
{{/if}}
2020-04-02 10:21:03 +02:00
{{#if userEnabled}}
{{wizard-mapper-selector-type
activeType=activeType
type='user'
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}}
2020-04-02 10:21:03 +02:00
{{#if showUserField}}
2020-03-21 18:30:11 +01:00
{{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}}
2020-03-24 10:35:46 +01:00
{{multi-select
content=categories
value=value
onChange=(action (mut value))
options=(hash
none='admin.wizard.select_category'
)}}
2020-03-23 06:41:04 +01:00
{{/if}}
{{#if showTag}}
{{tag-chooser
tags=value
2020-03-24 10:35:46 +01:00
filterable=true}}
2020-03-23 06:41:04 +01:00
{{/if}}
{{#if showGroup}}
2020-03-24 10:35:46 +01:00
{{multi-select
content=groups
2020-03-23 06:41:04 +01:00
value=value
onChange=(action (mut value))
options=(hash
none='admin.wizard.select_group'
)}}
{{/if}}
2020-04-02 10:21:03 +02:00
{{#if showUser}}
{{user-selector
topicId=topicId
includeMessageableGroups='true'
placeholderKey="composer.users_placeholder"
usernames=value
autocomplete="discourse"}}
{{/if}}
2020-03-21 18:30:11 +01:00
</div>