Project

General

Profile

« Previous | Next » 

Revision 54459

Added by Sofia Baltzi over 5 years ago

Move initialization function to composer

View differences:

modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/invite.component.ts
46 46

  
47 47
  private ckeditorContent: string;
48 48

  
49
  public defaultBody ='';
49
  // public defaultBody ='';
50 50

  
51 51
  public communityIdParam = {};
52 52
  public status: number = 1;
......
86 86
                this.fullname = Session.getUserFullName();
87 87
                console.log("Fullname from session " + Session.getUserFullName());
88 88

  
89
                this.defaultBody = Composer.initializeInvitationEmailsBody(this.communityId, this.community.title);
90

  
91
                // TODO move the initialisation
92
                this.body = {fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, signature: "OpenAIRE team", note: ""};
93
                this.email = {body: "", subject: "[OpenAIRE-Connect] " + community.title, recipients: []};
89
                this.body = Composer.initializeInvitationsBody(this.communityId, this.community.title, this.fullname);
90
                this.email = Composer.initializeInvitationsEmail(community.title);
94 91
                this.recipients = "";
95 92

  
96 93
                this.status = this.errorCodes.DONE;
......
133 130
                  this.successfulSentMessage = res + " email sent successfully!";
134 131
                }
135 132

  
136
                this.body = {fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, signature: "OpenAIRE team", note: ""};
137
                this.email = {body: "", subject: "[OpenAIRE-Connect] " + this.community.title, recipients: []};
133
                this.body = Composer.initializeInvitationsBody(this.communityId, this.community.title, this.fullname);
134
                this.email = Composer.initializeInvitationsEmail(this.community.title);
138 135
                this.recipients = "";
139 136
              },
140 137
              error => {

Also available in: Unified diff