diff --git a/src/app/core/config/config.model.ts b/src/app/core/config/config.model.ts index 50613450f..73bde3bac 100644 --- a/src/app/core/config/config.model.ts +++ b/src/app/core/config/config.model.ts @@ -56,6 +56,7 @@ export interface Config { useDataUrl?: any; userProfile?: any; stagingArea?: StagingAreaSettings; + privacyStatement: string; } export interface StagingAreaSettings { diff --git a/src/app/core/privacy-statement/privacy-statement.component.ts b/src/app/core/privacy-statement/privacy-statement.component.ts index 48cd20a42..a77833683 100644 --- a/src/app/core/privacy-statement/privacy-statement.component.ts +++ b/src/app/core/privacy-statement/privacy-statement.component.ts @@ -1,6 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; +import { ConfigService } from '@gsrs-core/config'; // tried this: // import html from '../assets/data/privacy-policy.html'; @@ -22,13 +23,21 @@ export class PrivacyStatementComponent implements OnInit { htmlText; constructor( private http:HttpClient, - private sanitizer:DomSanitizer + private sanitizer:DomSanitizer, + private configService: ConfigService ){ } ngOnInit(){ - this.http.get('assets/html/privacy-statement.html',{responseType:'text'}).subscribe(result=>{ - this.htmlText = this.sanitizer.bypassSecurityTrustHtml(result); - }, error => { - this.htmlText = "Error fetching page content"; - }); + const privacyStatement = this.configService.configData.privacyStatement; + if(privacyStatement) { + // if used, privacyStatement should be a json encoded string in config.json + this.htmlText = this.sanitizer.bypassSecurityTrustHtml(privacyStatement); + } else { + // if used overwrite this file with a simple html version of your privacy statement. + this.http.get('assets/html/privacy-statement.html',{responseType:'text'}).subscribe(result=>{ + this.htmlText = this.sanitizer.bypassSecurityTrustHtml(result); + }, error => { + this.htmlText = "Error fetching page content"; + }); + } } } \ No newline at end of file diff --git a/src/app/fda/config/config.json b/src/app/fda/config/config.json index 99ba8f2b0..2f6597225 100644 --- a/src/app/fda/config/config.json +++ b/src/app/fda/config/config.json @@ -1043,7 +1043,8 @@ "Age Groups", "Intervention Type", "Study Results", - "Conditions" + "Conditions", + "Substance Role" ] }, "clinicaltrialsus": { @@ -1059,7 +1060,8 @@ "Age Groups", "Intervention Type", "Study Results", - "Conditions" + "Conditions", + "Substance Role" ] }, "adverseeventpt": {