This commit is contained in:
Sofia Papacharalampous 2024-07-02 11:59:48 +03:00
parent db058ba069
commit 1bacd7fc4a
1 changed files with 10 additions and 10 deletions

View File

@ -216,7 +216,7 @@
<div *ngIf="field.category === dmpBlueprintSectionFieldCategoryEnum.System">
<div *ngIf="field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Title">
<mat-form-field class="w-100">
<input matInput placeholder="{{field.placeholder ?? 'DMP-EDITOR.FIELDS.TITLE' | translate}}" type="text" name="label" [formControl]="formGroup.get('label')" required>
<input matInput placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : 'DMP-EDITOR.FIELDS.TITLE' | translate}}" type="text" name="label" [formControl]="formGroup.get('label')" required>
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
{{formGroup.get('label').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('label').hasError('required')">
@ -224,12 +224,12 @@
</mat-form-field>
</div>
<div *ngIf="field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Description">
<rich-text-editor-component [form]="formGroup.get('description')" [editable]="formGroup.get('description').status !== 'DISABLED'" [placeholder]="field.placeholder ?? 'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [required]="field.required">
<rich-text-editor-component [form]="formGroup.get('description')" [editable]="formGroup.get('description').status !== 'DISABLED'" [placeholder]="field.placeholder && field.placeholder != '' ? field.placeholder : 'DMP-EDITOR.PLACEHOLDER.DESCRIPTION'" [required]="field.required">
</rich-text-editor-component>
</div>
<div *ngIf="field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Language">
<mat-form-field class="w-100">
<mat-select [formControl]="formGroup.get('language')" placeholder="{{field.placeholder ?? 'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
<mat-select [formControl]="formGroup.get('language')" placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : 'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
{{ lang.name }}
</mat-option>
@ -297,7 +297,7 @@
</div>
<div *ngIf="field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.AccessRights">
<mat-form-field class="w-100">
<mat-select [formControl]="formGroup.get('accessType')" placeholder="{{field.placeholder ?? 'DMP-EDITOR.FIELDS.ACCESS-TYPE' | translate}}">
<mat-select [formControl]="formGroup.get('accessType')" placeholder="{{ field.placeholder && field.placeholder != '' ? field.placeholder : 'DMP-EDITOR.FIELDS.ACCESS-TYPE' | translate}}">
<mat-option *ngFor="let dmpAccessType of dmpAccessTypeEnumValues" [value]="dmpAccessType">
{{enumUtils.toDmpAccessTypeString(dmpAccessType)}}
</mat-option>
@ -313,28 +313,28 @@
</div>
<div *ngIf="field.category === dmpBlueprintSectionFieldCategoryEnum.ReferenceType">
<ng-container *ngIf="field.multipleSelect">
<app-reference-field-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('references')" [dependencies]="formGroup.get('properties').get('dmpBlueprintValues')" [label]= "field.label" [placeholder]="field.placeholder ?? field.label" [referenceType]="field.referenceType" [multiple]="true"></app-reference-field-component>
<app-reference-field-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('references')" [dependencies]="formGroup.get('properties').get('dmpBlueprintValues')" [label]= "field.label" [placeholder]="field.placeholder && field.placeholder != '' ? field.placeholder : field.label" [referenceType]="field.referenceType" [multiple]="true"></app-reference-field-component>
</ng-container>
<ng-container *ngIf="!(field.multipleSelect)">
<app-reference-field-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('reference')" [dependencies]="formGroup.get('properties').get('dmpBlueprintValues')" [label]= "field.label" [placeholder]="field.placeholder ?? field.label" [referenceType]="field.referenceType" [multiple]="false"></app-reference-field-component>
<app-reference-field-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('reference')" [dependencies]="formGroup.get('properties').get('dmpBlueprintValues')" [label]= "field.label" [placeholder]="field.placeholder && field.placeholder != '' ? field.placeholder : field.label" [referenceType]="field.referenceType" [multiple]="false"></app-reference-field-component>
</ng-container>
</div>
<div *ngIf="field.category === dmpBlueprintSectionFieldCategoryEnum.Extra">
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Text">
<mat-form-field class="w-100">
<mat-label>{{field.label}}</mat-label>
<input matInput placeholder="{{field.placeholder ?? field.label}}" type="text" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" [required]="field.required">
<input matInput placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : field.label}}" type="text" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" [required]="field.required">
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.RichText">
<rich-text-editor-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" placeholder="{{field.placeholder ?? field.label}}" [required]="field.required"></rich-text-editor-component>
<rich-text-editor-component [form]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue')" placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : field.label}}" [required]="field.required"></rich-text-editor-component>
</div>
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Date">
<mat-form-field class="w-100">
<mat-label>{{field.label}}</mat-label>
<input matInput placeholder="{{field.placeholder ?? field.label}}" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('dateValue')" [matDatepicker]="date" [required]="field.required">
<input matInput placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : field.label}}" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('dateValue')" [matDatepicker]="date" [required]="field.required">
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker>
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('dateValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('dateValue').getError('backendError').message}}</mat-error>
@ -344,7 +344,7 @@
<div *ngIf="field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Number">
<mat-form-field class="w-100">
<mat-label>{{field.label}}</mat-label>
<input matInput placeholder="{{field.placeholder ?? field.label}}" type="number" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('numberValue')" [required]="field.required">
<input matInput placeholder="{{field.placeholder && field.placeholder != '' ? field.placeholder : field.label}}" type="number" name="value" [formControl]="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('numberValue')" [required]="field.required">
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('numberValue').hasError('backendError')">{{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('numberValue').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('numberValue').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>