no message

This commit is contained in:
Diamantis Tziotzios 2017-12-11 11:20:27 +02:00
parent 713ee01eae
commit 1cc7933693
3 changed files with 28 additions and 28 deletions

View File

@ -35,9 +35,8 @@
</a>
</div>
<button type="submit">Save</button>
<p>Form value: {{ form.value | json }}</p>
<button class="btn btn-primary" style="margin-top:20px;" type="submit">Save</button>
</form>
</div>
<p>Form value: {{ form.value | json }}</p>
</div>

View File

@ -11,5 +11,5 @@
font-size: 95%;
margin-bottom: 1em;
padding: 20px;
width: auto;
width: 100%;
}

View File

@ -88,25 +88,25 @@ export class DynamicFormComponent implements OnInit {
response => {
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
this.pages = this.getPages(this.dataModel);
//this.createPagination();
this.createPagination();
this.form = this.dataModel.buildForm();
this.visibilityRulesService.formGroup = this.form;
let rules: Rule[] = new JsonSerializer<Rule>().fromJSONArray(response.rules, Rule);
this.visibilityRulesService.buildVisibilityRules(rules)
this.progressbar = true;
this.progressbar = true;
this.route.fragment.subscribe((fragment: string) => {
if (fragment && document.querySelector('#' + fragment)) {
document.querySelector('#' + fragment).scrollIntoView();
this.visibleSidebar = true;
}
});
this.route.fragment.subscribe((fragment: string) => {
if (fragment && document.querySelector('#' + fragment)) {
document.querySelector('#' + fragment).scrollIntoView();
this.visibleSidebar = true;
}
});
this.route.queryParams.subscribe((params) => {
if (params && "page" in params && !isNaN(params["page"]))
this.currentPage = Number.parseInt(params["page"]);
//this.visibleSidebar = true;
});
this.route.queryParams.subscribe((params) => {
if (params && "page" in params && !isNaN(params["page"]))
this.currentPage = Number.parseInt(params["page"]);
//this.visibleSidebar = true;
});
},
error => {
console.log("Could not load dmp");
@ -141,18 +141,19 @@ export class DynamicFormComponent implements OnInit {
}
shouldDisplaySection(section: Section): Boolean {
return section.page == this.currentPage;
return section.page == this.currentPage;
}
createPagination() {
this.pages.forEach(item => {
this.stepperItems.push({
label: '',
command: (event: any) => {
this.currentPage = event.index;
}
})
});
}
//createPagination() {
// this.pages.forEach(item => {
// this.stepperItems.push({
// label: '',
// command: (event: any) => {
// this.paginationService.setCurrentIndex(event.index)
// }
// })
// })
//}
/* scrollToElemID(elemID) {
scroll("#" + elemID);
}