1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/templates/components/wizard-custom-input.hbs
2020-03-22 04:30:11 +11:00

50 Zeilen
1,1 KiB
Handlebars

{{#if options.hasOutput}}
{{#if outputPrefixKey}}
<div class="prefix">
<span>{{i18n outputPrefixKey}}</span>
</div>
{{/if}}
{{/if}}
<div class="pairs">
{{#each input.pairs as |pair|}}
{{wizard-custom-input-pair
pair=pair
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 options.hasOutput}}
<div class="connector">
{{#if outputConnectorKey}}
<span class="output-connector">
{{i18n outputConnectorKey}}
</span>
{{/if}}
</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'}}