-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#EXUI-1832: 'Choose file' and 'no file chosen' not being sent via Wel…
…sh translation API
- Loading branch information
1 parent
38fa699
commit b1468a7
Showing
6 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...d-case-ui-toolkit/src/lib/shared/components/palette/base-field/field-write.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
.input-upload-file { | ||
width: 100%; | ||
display: none; | ||
} | ||
|
||
.upload-file-container { | ||
display: flex; | ||
align-items: baseline; | ||
} | ||
|
||
.input-label { | ||
width: 8rem; | ||
} | ||
|
||
@import "../base-field/grey-bar.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 48 additions & 9 deletions
57
.../ccd-case-ui-toolkit/src/lib/shared/components/palette/document/write-document-field.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,60 @@ | ||
<div class="form-group" [ngClass]="{'form-group-error bottom-30': !valid}"> | ||
<label [for]="id()"> | ||
<span class="form-label" attr.aria-label="{{caseField | ccdFieldLabel}}">{{(caseField | ccdFieldLabel)}}</span> | ||
<span class="form-label" attr.aria-label="{{caseField | ccdFieldLabel}}" | ||
>{{(caseField | ccdFieldLabel)}}</span | ||
> | ||
</label> | ||
<span class="form-hint" *ngIf="caseField.hint_text">{{caseField.hint_text | rpxTranslate}}</span> | ||
<span class="error-message" *ngIf="fileUploadMessages && !valid">{{fileUploadMessages | rpxTranslate}}</span> | ||
<span class="form-hint" *ngIf="caseField.hint_text" | ||
>{{caseField.hint_text | rpxTranslate}}</span | ||
> | ||
<span class="error-message" *ngIf="fileUploadMessages && !valid" | ||
>{{fileUploadMessages | rpxTranslate}}</span | ||
> | ||
|
||
<div> | ||
<!--<span *ngIf="getUploadedFileName()" class="text-16">File name: {{getUploadedFileName()}}</span>--> | ||
<ccd-read-document-field *ngIf="caseField" [caseField]="caseField"></ccd-read-document-field> | ||
<ccd-read-document-field | ||
*ngIf="caseField" | ||
[caseField]="caseField" | ||
></ccd-read-document-field> | ||
</div> | ||
|
||
<div style='position:relative'> | ||
<div [id]="createElementId('fileInputWrapper')" (click)="fileSelectEvent()" (keyup)="fileSelectEvent()"></div> | ||
<input class="form-control bottom-30" [id]="id()" type="file" (keydown.Tab)="fileValidationsOnTab()" (change)="fileChangeEvent($event)" | ||
accept="{{caseField.field_type.regular_expression}}" #fileInput/> | ||
<div style="position: relative"> | ||
<div | ||
[id]="createElementId('fileInputWrapper')" | ||
(click)="fileSelectEvent()" | ||
(keyup)="fileSelectEvent()" | ||
></div> | ||
<div class="upload-file-container"> | ||
<label | ||
[for]="id()" | ||
class="button button-secondary input-label" | ||
aria-label="Choose file" | ||
>{{'Choose file' | rpxTranslate}}</label | ||
> | ||
<span class="form-control bottom-30"> | ||
<span>{{fileName | rpxTranslate}}</span> | ||
</span> | ||
</div> | ||
<input | ||
[id]="id()" | ||
type="file" | ||
class="input-upload-file" | ||
(keydown.Tab)="fileValidationsOnTab()" | ||
(change)="fileChangeEvent($event)" | ||
accept="{{caseField.field_type.regular_expression}}" | ||
#fileInput | ||
/> | ||
</div> | ||
</div> | ||
<div class="form-group bottom-30"> | ||
<button class="button button-secondary" type="button" aria-label="Cancel upload" (click)="cancelUpload()" [disabled]="!isUploadInProgress()">{{'Cancel upload' | rpxTranslate}}</button> | ||
<button | ||
class="button button-secondary" | ||
type="button" | ||
aria-label="Cancel upload" | ||
(click)="cancelUpload()" | ||
[disabled]="!isUploadInProgress()" | ||
> | ||
{{'Cancel upload' | rpxTranslate}} | ||
</button> | ||
</div> |