Revision 56583
Added by Konstantinos Triantafyllou almost 5 years ago
page-help-content-form.component.ts | ||
---|---|---|
44 | 44 |
if(!Session.isLoggedIn()){ |
45 | 45 |
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} }); |
46 | 46 |
} else { |
47 |
this.myForm.valueChanges.subscribe(value => { |
|
48 |
let pid = value.page; |
|
49 |
this._helpContentService.getPage(pid,this.properties.adminToolsAPIURL).subscribe(page => { |
|
47 |
if(this.pageId) { |
|
48 |
this._helpContentService.getPage(this.pageId,this.properties.adminToolsAPIURL).subscribe(page => { |
|
50 | 49 |
this.placements.top = page.top; |
51 | 50 |
this.placements.bottom = page.bottom; |
52 | 51 |
this.placements.left = page.left; |
53 | 52 |
this.placements.right = page.right; |
53 |
|
|
54 | 54 |
}); |
55 |
}) |
|
55 |
} else { |
|
56 |
this.myForm.valueChanges.subscribe(value => { |
|
57 |
let pid = value.page; |
|
58 |
this._helpContentService.getPage(pid, this.properties.adminToolsAPIURL).subscribe(page => { |
|
59 |
this.placements.top = page.top; |
|
60 |
this.placements.bottom = page.bottom; |
|
61 |
this.placements.left = page.left; |
|
62 |
this.placements.right = page.right; |
|
63 |
|
|
64 |
}); |
|
65 |
}); |
|
66 |
} |
|
56 | 67 |
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid).subscribe( |
57 | 68 |
pages => { |
58 | 69 |
this.availablePages = pages; |
... | ... | |
71 | 82 |
content : ['', Validators.required], |
72 | 83 |
order : [1, Validators.required], |
73 | 84 |
isActive : true, |
74 |
isPriorTo : false, |
|
85 |
//isPriorTo : false,
|
|
75 | 86 |
_id : '', |
76 | 87 |
}); |
77 | 88 |
} |
... | ... | |
84 | 95 |
content : [''], |
85 | 96 |
order : 1, |
86 | 97 |
isActive : true, |
87 |
isPriorTo : false, |
|
98 |
//isPriorTo : false,
|
|
88 | 99 |
_id : '' |
89 | 100 |
}); |
90 | 101 |
this.myForm.markAsPristine(); |
Also available in: Unified diff
Remove is Prior to option from edit and add page form.