mirror of https://github.com/rancher/ui.git
48 lines
1.8 KiB
Handlebars
48 lines
1.8 KiB
Handlebars
<div class="row">
|
|
{{!-- <div class="col span-6 clip vertical-middle"> --}}
|
|
{{#if (and canChangeName shouldChangeName)}}
|
|
{{input value=name placeholder=(if namePlaceholder (t namePlaceholder) '')}}
|
|
{{else}}
|
|
<h4 class="mb-0 vertical-middle">
|
|
{{#if label}}
|
|
{{t label}}
|
|
{{else}}
|
|
{{name}}
|
|
{{/if}}
|
|
{{#if nameRequired}}{{field-required}}{{/if}}
|
|
{{#if canChangeName}}
|
|
<button class="btn btn-sm bg-link p-0 pl-10 acc-label-hover" {{action "wantsChange"}}>{{t 'action.edit'}}</button>
|
|
{{/if}}
|
|
</h4>
|
|
{{/if}}
|
|
{{!-- </div> --}}
|
|
<div class="pull-right vertical-middle">
|
|
{{#if canUpload}}
|
|
{{#if showUploadLabel}}
|
|
<button class="btn bg-link icon-btn" {{action "click"}}>
|
|
<span class="darken"><i class="icon icon-upload text-small"/></span>
|
|
<span>{{t 'inputTextFile.tooltip'}}</span>
|
|
</button>
|
|
{{else}}
|
|
{{#tooltip-element type="tooltip-basic" model=(t 'inputTextFile.tooltip') tooltipTemplate="tooltip-static" aria-describedby="tooltip-base" tooltipFor="inputTextFile"}}
|
|
<button type="button" class="btn bg-link" {{action "click"}}><i class="icon icon-upload"></i></button>
|
|
{{/tooltip-element}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{yield}}
|
|
</div>
|
|
</div>
|
|
<hr/>
|
|
<div class="row">
|
|
<div class="col span-12 m-0 p-0" style="max-height: 400px; overflow: auto;">
|
|
{{ivy-codemirror
|
|
value=value
|
|
valueUpdated=(if valueUpdated valueUpdated (action (mut value)) )
|
|
options=(hash autofocus=true theme="monokai" lineNumbers=true mode=mode readOnly=(if (eq modalOpts.type 'review') true false) gutters=gutters lint=true viewportMargin=viewportMargin)
|
|
placeholder=placeholder
|
|
}}
|
|
</div>
|
|
</div>
|
|
{{yield 'description'}}
|
|
<input type="file" accept="{{actualAccept}}" multiple={{multiple}} class="hide">
|