0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-10-29 23:33:42 +01:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-selector.hbs

77 Zeilen
1,6 KiB
Handlebars

2020-03-21 18:30:11 +01:00
<div class="type-selector">
2020-04-06 03:54:16 +02:00
{{#if hasTypes}}
2021-04-12 16:19:53 +02:00
<a role="button" {{action "toggleTypes"}} class="active">
2020-04-06 03:54:16 +02:00
{{activeTypeLabel}}
</a>
2021-04-12 16:19:53 +02:00
2020-04-13 14:17:22 +02:00
{{#if showTypes}}
<div class="selector-types">
{{#each selectorTypes as |item|}}
{{wizard-mapper-selector-type
activeType=activeType
item=item
2023-07-10 08:55:54 +02:00
toggle=(action "toggleType")
}}
2020-04-13 14:17:22 +02:00
{{/each}}
</div>
{{/if}}
2020-04-06 03:54:16 +02:00
{{else}}
<span>{{activeTypeLabel}}</span>
{{/if}}
2020-03-21 18:30:11 +01:00
</div>
<div class="input">
{{#if showText}}
2023-04-03 04:28:06 +02:00
<Input
@type="text"
@value={{this.value}}
placeholder={{i18n placeholderKey}}
{{on "change" (action "changeInputValue")}}
/>
2020-03-21 18:30:11 +01:00
{{/if}}
2020-04-05 03:37:09 +02:00
{{#if showComboBox}}
2020-03-21 18:30:11 +01:00
{{combo-box
value=value
2020-04-05 03:37:09 +02:00
content=comboBoxContent
onChange=(action "changeValue")
2023-07-10 08:55:54 +02:00
options=(hash none=placeholderKey allowAny=comboBoxAllowAny)
}}
2020-03-21 18:30:11 +01:00
{{/if}}
2021-04-12 16:19:53 +02:00
2020-04-05 03:37:09 +02:00
{{#if showMultiSelect}}
2020-03-24 10:35:46 +01:00
{{multi-select
2020-04-05 03:37:09 +02:00
content=multiSelectContent
2020-03-24 10:35:46 +01:00
value=value
onChange=(action "changeValue")
2023-07-10 08:55:54 +02:00
options=multiSelectOptions
}}
2020-04-05 03:37:09 +02:00
{{/if}}
2021-04-12 16:19:53 +02:00
2020-04-05 03:37:09 +02:00
{{#if showList}}
{{wizard-value-list
2020-04-06 03:54:16 +02:00
values=value
addKey=placeholderKey
2023-07-10 08:55:54 +02:00
onChange=(action "changeValue")
}}
2020-03-23 06:41:04 +01:00
{{/if}}
2021-04-12 16:19:53 +02:00
2020-03-23 06:41:04 +01:00
{{#if showTag}}
{{tag-chooser
tags=value
onChange=(action "changeValue")
everyTag=true
2023-07-10 08:55:54 +02:00
options=(hash none=placeholderKey filterable=true)
}}
2020-03-23 06:41:04 +01:00
{{/if}}
2021-04-12 16:19:53 +02:00
2020-04-02 10:21:03 +02:00
{{#if showUser}}
{{wizard-user-chooser
2020-04-06 03:54:16 +02:00
placeholderKey=placeholderKey
value=value
autocomplete="discourse"
onChange=(action "changeUserValue")
options=userOptions
2023-07-10 08:55:54 +02:00
}}
2020-04-02 10:21:03 +02:00
{{/if}}
2023-07-10 08:55:54 +02:00
</div>