Add format Email body to invite users functionality
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54444 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8b970e94b8
commit
5ef63a02c9
|
@ -1,4 +1,5 @@
|
|||
import {Email} from "./email";
|
||||
import {Body} from "./body";
|
||||
|
||||
export class Composer {
|
||||
private static noteBodySize = "14px";
|
||||
|
@ -6,7 +7,8 @@ export class Composer {
|
|||
|
||||
// TODO move to properties
|
||||
private static openaireEmail = "mailto:openaire.test@gmail.com";
|
||||
private static signature = "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a><br>";
|
||||
private static openaireAddress = "<a href='https://www.openaire.eu'>www.openaire.eu</a><br>";
|
||||
private static signature = "OpenAIRE team<br>" + Composer.openaireAddress;
|
||||
|
||||
private static ifYouAreNotResponsible(): string {
|
||||
return "If you are not responsible for this community, please "
|
||||
|
@ -84,4 +86,21 @@ export class Composer {
|
|||
return email;
|
||||
}
|
||||
|
||||
public static formatEmailBodyForInvitation(body: Body): string {
|
||||
let fromMessageAndName = "";
|
||||
|
||||
if (body.fromName != "") {
|
||||
fromMessageAndName = "<span>" + body.fromMessage + body.fromName + "</span>";
|
||||
}
|
||||
|
||||
let formattedEmail = "<div style='font-size:" + this.noteBodySize + "'>"
|
||||
+ body.paragraphs
|
||||
+ "<p>" + body.signature + fromMessageAndName + "<br>"
|
||||
+ this.openaireAddress
|
||||
+ "</p>"
|
||||
+ "</div>";
|
||||
|
||||
return formattedEmail;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue