From 2121646303e0b2615cadddca76b481a3748288fa Mon Sep 17 00:00:00 2001 From: annampak Date: Fri, 1 Dec 2017 18:33:37 +0200 Subject: [PATCH] section in section & show type field when user selects combobox view style --- dmp-admin/src/app/app.component.css | 8 +++++++ .../app/field-form/field-form.component.html | 24 +++++++++++-------- .../section-form/section-form.component.html | 15 ++++++++---- .../section-form/section-form.component.ts | 6 +++++ 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/dmp-admin/src/app/app.component.css b/dmp-admin/src/app/app.component.css index 8e856d79c..75fcc7987 100644 --- a/dmp-admin/src/app/app.component.css +++ b/dmp-admin/src/app/app.component.css @@ -17,4 +17,12 @@ .cursor{ cursor: pointer; +} + +.hide{ + display:none; +} + +.show { + display:block; } \ No newline at end of file diff --git a/dmp-admin/src/app/field-form/field-form.component.html b/dmp-admin/src/app/field-form/field-form.component.html index 062a0d12d..85b1c0c24 100644 --- a/dmp-admin/src/app/field-form/field-form.component.html +++ b/dmp-admin/src/app/field-form/field-form.component.html @@ -14,17 +14,21 @@
+ + + + + +
- - + +
+
+ + +
@@ -62,10 +66,10 @@
-
+
-
- - Add another group + +
+ + Add section +
+
+ + Add group + + +
+
\ No newline at end of file diff --git a/dmp-admin/src/app/section-form/section-form.component.ts b/dmp-admin/src/app/section-form/section-form.component.ts index a4961c8ef..cef984dc6 100644 --- a/dmp-admin/src/app/section-form/section-form.component.ts +++ b/dmp-admin/src/app/section-form/section-form.component.ts @@ -33,5 +33,11 @@ export class SectionFormComponent { this.dataModel.fieldGroups.splice(index); (this.form.get("fieldGroups")).removeAt(index) } + + addSectioninSection(){ + let section:Section = new Section(); + this.dataModel.sections.push(section); + (this.form.get("sections")).push(section.buildForm()); + } } \ No newline at end of file