argos/dmp-frontend/src/app/ui/dmp/listing/upload-dialogue/dmp-upload-dialogue.compone...

48 lines
2.2 KiB
HTML

<div class="confirmation-dialog">
<div class="row">
<div class="confirmation-message col align-self-center">
<h4>{{'DMP-UPLOAD.TITLE' | translate}}</h4>
</div>
<div class="col-auto close-btn justify-content-end" (click)="close()">
<mat-icon>close</mat-icon>
</div>
</div>
<div class="row">
<div class="upload-form col-12">
<mat-form-field>
<input class="uploadInput" [(ngModel)]="dmpTitle" matInput placeholder="{{'DMP-UPLOAD.PLACEHOLDER' | translate}}" name="uploadFileInput">
</mat-form-field>
</div>
<div class="col-12">
<ngx-dropzone class="drop-file" (change)="selectFile($event)" [accept]="'text/xml, application/json'" [multiple]="false">
<ngx-dropzone-preview class="file-preview" *ngFor="let f of files" [removable]="true" (removed)="onRemove(f)">
<ngx-dropzone-label class="file-label">{{ f.name }}</ngx-dropzone-label>
</ngx-dropzone-preview>
</ngx-dropzone>
</div>
<div class="col-12 d-flex justify-content-center attach-btn">
<button mat-button type="button" class="col-auto attach-file" (click)="fileInput.click()">
<mat-icon class="mr-2">input</mat-icon>
{{'GENERAL.START-NEW-DMP-DIALOG.UPLOAD-FILE' | translate}}
</button>
<form>
<input class="hidden" #fileInput type="file" onClick="this.form.reset()" (change)="uploadFile($event)" accept="text/xml, application/json">
</form>
</div>
<div class="upload-form col-sm-12 col-md-12">
<mat-form-field>
<app-multiple-auto-complete required='true' [(ngModel)]="dmpProfiles" placeholder="{{'DMP-EDITOR.FIELDS.DATASET-TEMPLATES' | translate}}" [configuration]="profilesAutoCompleteConfiguration" (optionActionClicked)="onPreviewTemplate($event)">
</app-multiple-auto-complete>
</mat-form-field>
</div>
</div>
<div class="row mt-3">
<div class="col-auto ml-auto">
<button mat-button type="button" class="cancel-btn" (click)="cancel()">{{'DMP-UPLOAD.ACTIONS.CANCEL' | translate}}</button>
</div>
<div class="col-auto">
<button mat-button type="button" (click)="confirm()" [disabled]="data.fileList.length === 0" [ngClass]="{'next-btn-disabled': data.fileList.length === 0, 'next-btn': data.fileList.length !== 0}">{{'DMP-UPLOAD.ACTIONS.IMPORT' | translate}}</button>
</div>
</div>
</div>