54 lines
2.6 KiB
HTML
54 lines
2.6 KiB
HTML
<uploadinput
|
|
inline-template
|
|
|
|
v-bind:initial-errors='true'
|
|
|
|
v-bind:watch='false'
|
|
name='pdf'
|
|
:optional='false'
|
|
v-bind:token='token'
|
|
v-bind:object-name='"object_name"'
|
|
>
|
|
<div>
|
|
<div v-show="hasAttachment" class="uploaded-file">
|
|
|
|
<span class="icon icon--check-circle-solid " aria-hidden="true"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="check-circle" class="svg-inline--fa fa-check-circle fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg></span>
|
|
|
|
<span class="uploaded-file__name" v-html="baseName"></span>
|
|
<a href="#" class="uploaded-file__remove" v-on:click="removeAttachment">Remove</a>
|
|
</div>
|
|
<div v-show="hasAttachment === false" v-bind:class='{ "usa-input": true, "usa-input--error": showErrors }'>
|
|
|
|
|
|
<div v-if="!hideInput" class="upload-widget">
|
|
<label class="upload-label" for="pdf">
|
|
<span class="upload-button">
|
|
Browse
|
|
</span>
|
|
|
|
<span v-show="showErrors">
|
|
<span class="icon icon--alert icon-validation" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="#fdb81e">
|
|
<path d="M8 16c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8zM8 2C4.691 2 2 4.691 2 8s2.691 6 6 6 6-2.691 6-6-2.691-6-6-6zm0 8c-.552 0-1-.447-1-1V4c0-.552.448-1 1-1s1 .448 1 1v5c0 .553-.448 1-1 1zm0 3c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.271.11-.521.29-.71.38-.37 1.05-.37 1.42 0 .18.189.29.45.29.71s-.11.52-.29.71c-.19.18-.45.29-.71.29z"/>
|
|
</svg>
|
|
</span>
|
|
</span>
|
|
|
|
</label>
|
|
<input
|
|
v-on:change="addAttachment"
|
|
ref="attachmentInput"
|
|
accept=""
|
|
id="pdf"
|
|
name="pdf"
|
|
aria-label="Task Order Upload"
|
|
v-bind:value="attachment"
|
|
type="file">
|
|
<input type="hidden" name="pdf-filename" id="pdf-filename" ref="attachmentFilename">
|
|
<input type="hidden" name="pdf-object_name" id="pdf-object_name" ref="attachmentObjectName">
|
|
</div>
|
|
|
|
<span v-show="showErrors" class="usa-input__message">['Test Error Message']</span>
|
|
|
|
</div>
|
|
</div>
|
|
</uploadinput> |