Revert "[PS-1465] Fix #2806 - The "Import Data" page's file selector button cannot be translated (#3502)" (#3900)
This reverts commit 768de03269
.
This commit is contained in:
parent
534e1c804b
commit
6cad253442
|
@ -291,25 +291,12 @@
|
|||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="file">2. {{ "selectImportFile" | i18n }}</label>
|
||||
<br />
|
||||
<div class="file-selector">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-primary"
|
||||
onclick="document.getElementById('file').click()"
|
||||
>
|
||||
{{ "chooseFile" | i18n }}
|
||||
</button>
|
||||
{{ this.fileSelected ? this.fileSelected.name : ("noFileChosen" | i18n) }}
|
||||
</div>
|
||||
<input
|
||||
type="file"
|
||||
id="file"
|
||||
class="form-control-file"
|
||||
name="file"
|
||||
style="display: none"
|
||||
[disabled]="importBlockedByPolicy$ | async"
|
||||
(change)="setSelectedFile($event)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -25,7 +25,6 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||
importOptions: ImportOption[];
|
||||
format: ImportType = null;
|
||||
fileContents: string;
|
||||
fileSelected: File;
|
||||
formPromise: Promise<ImportError>;
|
||||
loading = false;
|
||||
importBlockedByPolicy$ = this.policyService.policyAppliesToActiveUser$(
|
||||
|
@ -185,11 +184,6 @@ export class ImportComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
}
|
||||
|
||||
setSelectedFile(event: Event) {
|
||||
const fileInputEl = <HTMLInputElement>event.target;
|
||||
this.fileSelected = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;
|
||||
}
|
||||
|
||||
private async error(error: Error) {
|
||||
await Swal.fire({
|
||||
heightAuto: false,
|
||||
|
|
Loading…
Reference in New Issue