From b99502237af67360e7c49ba9095a1950a4bfb7b8 Mon Sep 17 00:00:00 2001 From: annabakouli Date: Wed, 3 Jan 2018 16:19:38 +0200 Subject: [PATCH] no message --- .../field-form/field-form.component.html | 2 +- .../form/form.component.ts | 14 +++++------ .../src/app/models/DataSetProfile/Field.ts | 10 +++++++- .../src/app/models/DataSetProfile/FieldSet.ts | 4 ++-- .../src/app/models/DataSetProfile/Section.ts | 6 ++--- .../commons/datafield/FreeTextData.java | 2 +- .../utilities/builders/ModelBuilder.java | 23 ++++++++++--------- 7 files changed, 34 insertions(+), 27 deletions(-) diff --git a/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html b/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html index 3a3db98a7..e09e59dcf 100644 --- a/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html +++ b/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html @@ -41,7 +41,7 @@
-
+
diff --git a/dmp-admin/src/app/dataset-profile-form/form/form.component.ts b/dmp-admin/src/app/dataset-profile-form/form/form.component.ts index fdd6cbaf7..b16ca40e2 100644 --- a/dmp-admin/src/app/dataset-profile-form/form/form.component.ts +++ b/dmp-admin/src/app/dataset-profile-form/form/form.component.ts @@ -1,16 +1,14 @@ -import { DatasetProfileService } from 'app/services/dataset-profile.service'; +import { Section } from '../../models/DataSetProfile/Section'; +import { JsonSerializer } from '../../utilities/JsonSerializer'; +import { DatasetProfileService } from '../../services/dataset-profile.service'; +import { RestBase } from '../../services/rest-base'; +import { DatasetProfileModel } from '../../models/DataSetProfile/DatasetProfileModel'; +import { Page } from '../../models/DataSetProfile/Page'; import { Component, OnInit } from '@angular/core'; import { FormGroup, FormControl } from '@angular/forms'; -import { JsonSerializer } from 'app/utilities/JsonSerializer'; import { SectionFormComponent } from '../section-form/section-form.component'; -import { Section } from 'app/models/DataSetProfile/Section'; -import { FieldGroup } from 'app/models/DataSetProfile/FieldGroup'; -import { DatasetProfileModel } from 'app/models/DataSetProfile/DatasetProfileModel'; -import { TestModel } from 'app/testModel/testModel'; import { FormArray } from '@angular/forms/src/model'; -import { RestBase } from 'app/services/rest-base'; import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router'; -import { Page } from 'app/models/DataSetProfile/Page' import { PageFormComponent } from '../page-form/page-component' @Component({ diff --git a/dmp-admin/src/app/models/DataSetProfile/Field.ts b/dmp-admin/src/app/models/DataSetProfile/Field.ts index 9b10791cc..0472e032b 100644 --- a/dmp-admin/src/app/models/DataSetProfile/Field.ts +++ b/dmp-admin/src/app/models/DataSetProfile/Field.ts @@ -1,4 +1,8 @@ -import { RadioBoxData } from '../DataField/RadioBoxData'; +import { BooleanDecisionData } from '../DataField/BooleanDecisionData'; +import { FreeTextData } from '../DataField/FreeTextData'; +import { TextArea } from '../DataField/TextArea'; +import { CheckBoxData } from '../DataField/CheckBoxData'; +import { RadioBoxData } from '../DataField/RadioBoxData'; import { WordListData } from '../DataField/WordListData'; import { AutocompleteData } from '../DataField/AutocompleteData'; import { DataField } from '../DataField/DataField'; @@ -40,6 +44,10 @@ export class Field extends BaseModel implements Serializable,FormGenerato if(item.data.type === "wordlist")this.data = new JsonSerializer().fromJSONObject(item.data,WordListData); }else{ if(this.viewStyle.renderStyle === "radiobox") this.data = new JsonSerializer().fromJSONObject(item.data,RadioBoxData); + if(this.viewStyle.renderStyle === "checkBox") this.data = new JsonSerializer().fromJSONObject(item.data,CheckBoxData); + if(this.viewStyle.renderStyle === "textarea") this.data = new JsonSerializer