0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-20 07:41:11 +02:00
discourse-custom-wizard/assets/javascripts/discourse/templates/components/wizard-mapper-input.hbs

55 Zeilen
1,2 KiB
Handlebars

2020-04-05 03:37:09 +02:00
{{wizard-mapper-connector
connector=input.type
connectors=inputTypes
2020-04-15 07:22:21 +02:00
inputTypes=true
inputType=inputType
connectorType="type"
2020-04-20 11:41:13 +02:00
options=options
onUpdate=onUpdate}}
2020-03-21 18:30:11 +01:00
2020-03-23 06:41:04 +01:00
{{#if hasPairs}}
2020-04-01 07:03:26 +02:00
<div class="mapper-pairs mapper-block">
2020-03-23 06:41:04 +01:00
{{#each input.pairs as |pair|}}
2020-04-01 07:03:26 +02:00
{{wizard-mapper-pair
2020-03-23 06:41:04 +01:00
pair=pair
last=pair.last
2020-03-24 10:35:46 +01:00
inputType=inputType
2020-03-23 06:41:04 +01:00
options=options
2020-04-20 11:41:13 +02:00
removePair=(action 'removePair')
onUpdate=onUpdate}}
2020-03-23 06:41:04 +01:00
{{/each}}
2020-04-01 07:03:26 +02:00
2020-04-07 09:54:30 +02:00
{{#if canAddPair}}
2020-03-24 10:35:46 +01:00
<a {{action 'addPair'}} class="add-pair">
{{d-icon 'plus'}}
</a>
2020-03-23 06:41:04 +01:00
{{/if}}
</div>
2020-03-24 10:35:46 +01:00
{{/if}}
2018-05-24 07:34:58 +02:00
2020-04-01 07:03:26 +02:00
{{#if hasOutput}}
{{#if hasPairs}}
2020-04-02 07:21:57 +02:00
{{wizard-mapper-connector
2020-04-06 10:36:38 +02:00
connector=input.output_connector
2020-04-15 07:22:21 +02:00
connectors=connectors
connectorType="output"
inputType=inputType
2020-04-20 11:41:13 +02:00
options=options
onUpdate=onUpdate}}
2020-03-24 10:35:46 +01:00
{{/if}}
2020-03-21 18:30:11 +01:00
2020-04-01 07:03:26 +02:00
<div class="output mapper-block">
{{wizard-mapper-selector
2020-03-24 10:35:46 +01:00
selectorType='output'
2020-04-06 03:54:16 +02:00
inputType=input.type
2020-03-21 18:30:11 +01:00
value=input.output
activeType=input.output_type
2020-04-20 11:41:13 +02:00
options=options
onUpdate=onUpdate}}
2020-03-21 18:30:11 +01:00
</div>
{{/if}}
2020-03-24 10:35:46 +01:00
<a class="remove-input" {{action remove input}}>
{{d-icon 'times'}}
</a>