no message
This commit is contained in:
parent
713ee01eae
commit
1cc7933693
|
@ -35,9 +35,8 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Save</button>
|
<button class="btn btn-primary" style="margin-top:20px;" type="submit">Save</button>
|
||||||
|
|
||||||
<p>Form value: {{ form.value | json }}</p>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<p>Form value: {{ form.value | json }}</p>
|
||||||
</div>
|
</div>
|
|
@ -11,5 +11,5 @@
|
||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
width: auto;
|
width: 100%;
|
||||||
}
|
}
|
|
@ -88,25 +88,25 @@ export class DynamicFormComponent implements OnInit {
|
||||||
response => {
|
response => {
|
||||||
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
|
this.dataModel = new JsonSerializer<DatasetModel>().fromJSONObject(response, DatasetModel);
|
||||||
this.pages = this.getPages(this.dataModel);
|
this.pages = this.getPages(this.dataModel);
|
||||||
//this.createPagination();
|
this.createPagination();
|
||||||
this.form = this.dataModel.buildForm();
|
this.form = this.dataModel.buildForm();
|
||||||
this.visibilityRulesService.formGroup = this.form;
|
this.visibilityRulesService.formGroup = this.form;
|
||||||
let rules: Rule[] = new JsonSerializer<Rule>().fromJSONArray(response.rules, Rule);
|
let rules: Rule[] = new JsonSerializer<Rule>().fromJSONArray(response.rules, Rule);
|
||||||
this.visibilityRulesService.buildVisibilityRules(rules)
|
this.visibilityRulesService.buildVisibilityRules(rules)
|
||||||
this.progressbar = true;
|
this.progressbar = true;
|
||||||
|
|
||||||
this.route.fragment.subscribe((fragment: string) => {
|
this.route.fragment.subscribe((fragment: string) => {
|
||||||
if (fragment && document.querySelector('#' + fragment)) {
|
if (fragment && document.querySelector('#' + fragment)) {
|
||||||
document.querySelector('#' + fragment).scrollIntoView();
|
document.querySelector('#' + fragment).scrollIntoView();
|
||||||
this.visibleSidebar = true;
|
this.visibleSidebar = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route.queryParams.subscribe((params) => {
|
this.route.queryParams.subscribe((params) => {
|
||||||
if (params && "page" in params && !isNaN(params["page"]))
|
if (params && "page" in params && !isNaN(params["page"]))
|
||||||
this.currentPage = Number.parseInt(params["page"]);
|
this.currentPage = Number.parseInt(params["page"]);
|
||||||
//this.visibleSidebar = true;
|
//this.visibleSidebar = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log("Could not load dmp");
|
console.log("Could not load dmp");
|
||||||
|
@ -141,18 +141,19 @@ export class DynamicFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldDisplaySection(section: Section): Boolean {
|
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) {
|
/* scrollToElemID(elemID) {
|
||||||
scroll("#" + elemID);
|
scroll("#" + elemID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue