ui/app/components/input-custom-answers/template.hbs

42 lines
1.4 KiB
Handlebars

<div class="btn-group pull-right">
{{#if pasteOrUpload}}
<button class="btn btn-sm" {{action 'cancel'}}>{{t 'inputAnswers.editAsForm'}}</button>
{{else}}
<button class="btn btn-sm bg-primary" {{action 'showPaste'}}>{{t 'inputAnswers.yaml'}} <span class="icon icon-copy"></span></button>
{{/if}}
<button class="btn btn-sm bg-primary" {{action 'upload'}}>{{t 'uploadFile.label'}} <span class="icon icon-upload"></span></button>
</div>
<div class="mt-25">
{{#if pasteOrUpload}}
<div class="clearfix">
<label class="acc-label">{{t 'inputAnswers.yamlConfig'}}</label>
</div>
<div class="p-20">
{{input-yaml
showUpload=false
showDownload=false
canChangeName=false
value=pastedAnswers
autoResize=true
minHeight=500
}}
</div>
{{top-errors errors=yamlErrors}}
{{else if showInput}}
{{form-key-value
initialMap=app.answers
changed=(action (mut app.answers))
allowEmptyValue=false
addInitialEmptyRow=true
editing=true
header=(t 'newCatalog.answers.label')
addActionLabel="newCatalog.answers.addAction"
keyLabel="newContainer.environment.keyLabel"
keyPlaceholder="newContainer.environment.keyPlaceholder"
valueLabel="newContainer.environment.valueLabel"
valuePlaceholder="newContainer.environment.valuePlaceholder"
}}
{{/if}}
</div>
<input type="file" accept="{{actualAccept}}" class="hide">