diff --git a/src/app/utils/subscribe/invite/invite.component.html b/src/app/utils/subscribe/invite/invite.component.html index 5645b7d..b1065f2 100644 --- a/src/app/utils/subscribe/invite/invite.component.html +++ b/src/app/utils/subscribe/invite/invite.component.html @@ -5,7 +5,7 @@
OpenAIRE invites you to subscribe in _Community_name_ dashboard.
The community dashboard is part of the OpenAIRE-Connect project.
'; public defaultBody =''; + public communityIdParam = {}; + constructor ( + private element: ElementRef, private route: ActivatedRoute, private _router: Router, public _fb: FormBuilder, @@ -52,6 +55,7 @@ export class InviteComponent implements OnInit { if(!this.communityId){ this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname); } + this.communityIdParam = (ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:this.communityId}; }); } @@ -80,9 +84,18 @@ export class InviteComponent implements OnInit { ); } + + this.scroll(); }); } + public scroll() { + console.info("scroll into view"); + if (typeof document !== 'undefined') { + this.element.nativeElement.scrollIntoView(); + } + } + public invite() { this.showLoading = true; if (this.recipients != "") {