diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts index 34e4c5dbc..d80d1ebbf 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts @@ -67,7 +67,7 @@ export class FieldEditorModel extends BaseFormModel { id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('FieldEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]], // title: [this.title], page: [{ value: this.page, disabled: (disabled && !skipDisable.includes('FieldEditorModel.page')) }], - ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('FieldEditorModel.ordinal')) }, [Validators.required]], + ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('FieldEditorModel.ordinal')) }], validations: [{ value: this.validations, disabled: (disabled && !skipDisable.includes('FieldEditorModel.validations')) }], rdaCommonStandard: [{value: this.rdaCommonStandard, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.rdaCommonStandard')) }] }); diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts index 2b22c5700..e0ed0479f 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { FormArray, FormControl, FormGroup } from '@angular/forms'; import { FieldEditorModel } from '../../../admin/field-editor-model'; +import { Guid } from '../../../../../../common/types/guid'; @Component({ selector: 'app-dataset-profile-editor-composite-field-component', @@ -54,6 +55,7 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit { addNewField() { const field: FieldEditorModel = new FieldEditorModel(); + field.id=Guid.create().toString(); (this.form.get('fields')).push(field.buildForm()); } diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html index 446ad980a..b9c42bc35 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html @@ -1,84 +1,79 @@
- - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | + + + + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}} - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' | translate}} - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.NO' + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.NO' | translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' | - translate}} - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' - | - translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' | translate}} + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' | translate}} + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - - - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }} - {{opt.get('label').value}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + + + + + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }} + {{opt.get('label').value}} + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - + + - + - - + + - - - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}} - {{opt.get('label').value}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}} + {{opt.get('label').value}} + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + + + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + - - - - - - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} - - + + + + + + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} + +
diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html index 29d6babe0..0f4dd6889 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html @@ -23,7 +23,7 @@ - +