Clean up and generalize jinja to vue test template rendering and testing
This commit is contained in:
40
js/test_templates/upload_input_template.html
Normal file
40
js/test_templates/upload_input_template.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<uploadinput
|
||||
inline-template
|
||||
|
||||
v-bind:initial-data='initialvalue'
|
||||
|
||||
v-bind:watch='false'
|
||||
name='datafield'
|
||||
:optional='false'
|
||||
>
|
||||
<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="datafield">
|
||||
<span class="upload-button">
|
||||
Browse
|
||||
</span>
|
||||
|
||||
</label>
|
||||
<input
|
||||
v-on:change="addAttachment"
|
||||
ref="attachmentInput"
|
||||
accept=""
|
||||
id="datafield"
|
||||
name="datafield"
|
||||
aria-label="Task Order Upload"
|
||||
type="file">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</uploadinput>
|
Reference in New Issue
Block a user