|
|
|
@ -10,17 +10,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div mat-dialog-content class="row">
|
|
|
|
|
<div *ngFor="let field of systemFields;">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<mat-form-field class="w-100">
|
|
|
|
|
<mat-label>{{field}}</mat-label>
|
|
|
|
|
<input matInput type="text" [name]="field" [formControl]="formGroup.get(field)">
|
|
|
|
|
<i matSuffix class="fa fa-spinner fa-spin" *ngIf="field == systemFields[0] && formGroup.get(field).pending && !referenceExists"></i>
|
|
|
|
|
<mat-icon *ngIf="field == systemFields[0] && !formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).valid && !referenceExists" class="text-success" matSuffix>check</mat-icon>
|
|
|
|
|
<mat-icon *ngIf="field == systemFields[0] && !formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).invalid || referenceExists" class="text-danger" matSuffix>clear</mat-icon>
|
|
|
|
|
<small *ngIf="field == systemFields[0] && referenceExists" class="text-danger">{{'REFERENCE-FIELD.REFERENCE-DIALOG-EDITOR.IDENTIFIER-EXISTS' | translate}}</small>
|
|
|
|
|
<mat-error *ngIf="formGroup.get(field).hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
|
<ng-container *ngIf="field == systemFields[0]">
|
|
|
|
|
<i matSuffix class="fa fa-spinner fa-spin" *ngIf="formGroup.get(field).pending && !referenceExists"></i>
|
|
|
|
|
<mat-icon *ngIf="!formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).valid && !referenceExists" class="text-success" matSuffix>check</mat-icon>
|
|
|
|
|
<mat-icon *ngIf="!formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).invalid || referenceExists" class="text-danger" matSuffix>clear</mat-icon>
|
|
|
|
|
<small *ngIf="referenceExists" class="text-danger">{{'REFERENCE-FIELD.REFERENCE-DIALOG-EDITOR.IDENTIFIER-EXISTS' | translate}}</small>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|