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:
Daniel James Smith 2022-10-28 15:09:07 +02:00 committed by GitHub
parent 534e1c804b
commit 6cad253442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View File

@ -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>

View File

@ -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,