Revision 58412
Added by Andreas Mantas about 4 years ago
register-new-datasource.component.ts | ||
---|---|---|
49 | 49 |
private router: Router, |
50 | 50 |
private repoService: RepositoryService) {} |
51 | 51 |
|
52 |
// @ViewChild('updateTermsForm') |
|
53 |
|
|
52 | 54 |
ngOnInit() { |
53 | 55 |
if (this.datasourceType) { |
54 | 56 |
|
... | ... | |
76 | 78 |
} |
77 | 79 |
} else if (stepName === 'finish') { |
78 | 80 |
this.currentStep = 3; |
81 |
// ToU: to enable ToU delete the 2 lines above and uncomment the section below |
|
82 |
/*} else if (stepName === 'termsOfUse') { |
|
83 |
if (this.interfacesArray && this.interfacesArray.length === 0) { |
|
84 |
this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`); |
|
85 |
} else { |
|
86 |
this.currentStep = 3; |
|
87 |
} |
|
88 |
} else if (stepName === 'finish') { |
|
89 |
this.currentStep = 4;*/ |
|
79 | 90 |
} |
80 | 91 |
} |
81 | 92 |
this.rightHelperContent.ngOnInit(); |
... | ... | |
97 | 108 |
} else { |
98 | 109 |
if (this.repoInterfaces.length > 0) { |
99 | 110 |
this.addRepository(); |
111 |
// ToU: replace above line with the comment below |
|
112 |
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=termsOfUse`); |
|
100 | 113 |
} else { |
101 | 114 |
this.errorMessage = noInterfacesSaved; |
102 | 115 |
window.scrollTo(1, 1); |
... | ... | |
104 | 117 |
} |
105 | 118 |
} |
106 | 119 |
); |
120 |
// ToU: uncomment these lines |
|
121 |
// } else if ( this.currentStep === 3 ) { |
|
122 |
// this.addRepository(); |
|
107 | 123 |
} |
108 | 124 |
} |
109 | 125 |
|
... | ... | |
113 | 129 |
of(this.getInterfaces()).subscribe( |
114 | 130 |
() => this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=basicInformation`) |
115 | 131 |
); |
132 |
// ToU: uncomment these lines |
|
133 |
// } else if (this.currentStep === 3) { |
|
134 |
// this.router.navigateByUrl(`/sources/register/${this.datasourceType}?step=interfaces`); |
|
116 | 135 |
} |
117 | 136 |
} |
118 | 137 |
|
... | ... | |
207 | 226 |
}, |
208 | 227 |
() => { |
209 | 228 |
this.saveNewInterfaces(); |
229 |
// TODO: update terms when backend is ready, maybe POST with updateRepository |
|
210 | 230 |
} |
211 | 231 |
); |
212 | 232 |
} |
Also available in: Unified diff
added Terms of Use functionality - follow 'ToU' comments to enable