mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-16 22:08:08 +00:00
Fixes after review
This commit is contained in:
@ -1,26 +1,34 @@
|
||||
<h1 mat-dialog-title>Import project</h1>
|
||||
<mat-horizontal-stepper #stepper [linear]="true">
|
||||
<mat-step label="Choose file" editable="false" completed="false">
|
||||
<input type="file" accept=".gns3project, .gns3p" class="non-visible" #file (change)="uploadProjectFile($event)" ng2FileSelect [uploader]="uploader"/>
|
||||
<button mat-raised-button color="primary" (click)="file.click()">Choose file</button>
|
||||
<mat-form-field class="file-name-form">
|
||||
<input matInput tabindex="1" (input)="validateInput()" [(ngModel)]="projectName" placeholder="Please enter name">
|
||||
</mat-form-field>
|
||||
<button class="material-icons" (click)="onDeleteClick()">delete</button>
|
||||
<div class="buttons-bar">
|
||||
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
||||
<button mat-button ng-disabled="!isImportEnabled" (click)="onImportClick()" tabindex="2" mat-raised-button color="primary">Import</button>
|
||||
<div>
|
||||
<input type="file" accept=".gns3project, .gns3p" class="non-visible" #file (change)="uploadProjectFile($event)" ng2FileSelect [uploader]="uploader"/>
|
||||
<button mat-raised-button color="primary" (click)="file.click()" class="file-button">Choose file</button>
|
||||
<form [formGroup]="projectNameForm" class="file-name-form">
|
||||
<mat-form-field class="file-name-form-field">
|
||||
<input matInput type="text" formControlName="projectName" [ngClass]="{ 'is-invalid': form.projectName.errors }" placeholder="Please enter name" />
|
||||
<mat-error *ngIf="form.projectName.errors && form.projectName.errors.required">Project name is required</mat-error>
|
||||
<mat-error *ngIf="form.projectName.errors && form.projectName.errors.invalidName">Project name is incorrect</mat-error>
|
||||
</mat-form-field>
|
||||
<button class="delete-button">
|
||||
<mat-icon color="primary" (click)="onDeleteClick()" class="delete-icon">clear</mat-icon>
|
||||
</button>
|
||||
<div class="buttons-bar">
|
||||
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
||||
<button mat-button [disabled]="!isImportEnabled" (click)="onImportClick()" tabindex="2" mat-raised-button color="primary">Import</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</mat-step>
|
||||
<mat-step label="Progress" editable="false" completed="false">
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" [ngStyle]="{ 'width': uploader.progress + '%' }"></div>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{errorMessage}}</span>
|
||||
<div class="result-message-box">
|
||||
<span>{{resultMessage}}</span>
|
||||
</div>
|
||||
<div class="buttons-bar">
|
||||
<button mat-button ng-disabled="!isFinishEnabled" (click)="onNoClick()" tabindex="2" mat-raised-button color="primary">Finish</button>
|
||||
<button mat-button [disabled]="!isFinishEnabled" (click)="onNoClick()" tabindex="2" mat-raised-button color="primary">Finish</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-horizontal-stepper>
|
Reference in New Issue
Block a user