1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/templates/components/wizard-custom-input.hbs
Angus McLeod 3a14cb0805 wip
2020-03-23 16:41:04 +11:00

52 Zeilen
1,2 KiB
Handlebars

{{#if options.hasOutput}}
<div class="prefix">
{{combo-box
value=input.type
contents=inputTypes
onChange=(mut (input.prefix))}}
</div>
{{/if}}
{{#if hasPairs}}
<div class="pairs">
{{#each input.pairs as |pair|}}
{{wizard-custom-input-pair
pair=pair
last=pair.last
keyPlaceholder=keyPlaceholder
valuePlaceholder=valuePlaceholder
userFields=userFields
wizardFields=wizardFields
options=options
removePair=(action 'removePair')}}
{{/each}}
{{#if options.hasOutput}}
<a {{action 'addPair'}} class="add-pair">{{d-icon 'plus'}}</a>
{{/if}}
</div>
{{/if }}
{{#if options.hasOutput}}
<div class="connector">
<span class="output-connector">
{{outputConnector}}
</span>
</div>
<div class="output input-block">
{{wizard-custom-input-chooser
inputType='output'
userFields=userFields
wizardFields=wizardFields
value=input.output
activeType=input.output_type
customPlaceholder=outputPlaceholder
options=options}}
</div>
{{/if}}
{{d-button
action=remove
actionParam=input
icon='times'
class='remove-input'}}