This is an automated email from the git hooks/post-receive script. New commit to branch feature/44_several_email_address in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 41a0c8a3773cd869fbb4ab2d1320000d9fffd54c Author: Kevin Morin <morin@codelutin.com> Date: Thu Oct 12 16:05:59 2017 +0200 refs #44 meilleure gestion des emails de validation --- .../pollen/services/service/mail/EmailService.java | 4 +--- .../services/service/mail/ResendValidationEmail.java | 9 --------- .../services/service/mail/UserAccountCreatedEmail.java | 9 --------- .../main/resources/email/ResendValidationEmail.mustache | 6 ++---- .../resources/email/ResendValidationEmail_fr.mustache | 6 ++---- .../resources/email/UserAccountCreatedEmail.mustache | 8 ++------ .../resources/email/UserAccountCreatedEmail_fr.mustache | 8 ++------ .../email/UserAccountEmailValidatedEmail.mustache | 4 +++- .../email/UserAccountEmailValidatedEmail_fr.mustache | 4 +++- pollen-ui-riot-js/src/main/web/i18n/en.json | 13 +++++++------ pollen-ui-riot-js/src/main/web/i18n/fr.json | 13 +++++++------ pollen-ui-riot-js/src/main/web/tag/SignCheck.tag.html | 17 +++++++++-------- 12 files changed, 38 insertions(+), 63 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java index 6d9f4d1a..f0e8d62c 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/EmailService.java @@ -230,8 +230,6 @@ public class EmailService extends PollenServiceSupport { UserAccountCreatedEmail email = new UserAccountCreatedEmail(getLocale()); email.setUser(user); - email.setPollenUrl(getUIContext().getUiEndPoint()); - PollenEntityId<PollenUser> userId = getPollenEntityId(user); email.setValidateUrl(getPollenUIUrlRenderService().getUserValidateUrl(getUIContext().getUserValidateUrl(), userId.getReducedId(), @@ -275,13 +273,13 @@ public class EmailService extends PollenServiceSupport { public UserAccountEmailValidatedEmail newUserAccountEmailValidatedEmail(PollenUser user) { UserAccountEmailValidatedEmail email = new UserAccountEmailValidatedEmail(getLocale()); email.setUser(user); + email.setPollenUrl(getUIContext().getUiEndPoint()); return email; } public ResendValidationEmail newUserResendValidationEmail(PollenUser user, PollenUserEmailAddress emailAddress) { ResendValidationEmail email = new ResendValidationEmail(getLocale()); email.setUser(user); - email.setPollenUrl(getUIContext().getUiEndPoint()); PollenEntityId<PollenUser> userId = getPollenEntityId(user); email.setValidateUrl(getPollenUIUrlRenderService().getUserValidateUrl(getUIContext().getUserValidateUrl(), diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/ResendValidationEmail.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/ResendValidationEmail.java index 1b0f9408..2f4f5887 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/ResendValidationEmail.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/ResendValidationEmail.java @@ -37,7 +37,6 @@ public class ResendValidationEmail extends PollenMail { private PollenUser user; private String validateUrl; - private String pollenUrl; protected ResendValidationEmail(Locale locale) { super(locale); @@ -64,12 +63,4 @@ public class ResendValidationEmail extends PollenMail { this.validateUrl = validateUrl; } - public String getPollenUrl() { - return pollenUrl; - } - - public void setPollenUrl(String pollenUrl) { - this.pollenUrl = pollenUrl; - } - } diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/UserAccountCreatedEmail.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/UserAccountCreatedEmail.java index 72d6695c..547d1fac 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/UserAccountCreatedEmail.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/mail/UserAccountCreatedEmail.java @@ -37,7 +37,6 @@ public class UserAccountCreatedEmail extends PollenMail { private PollenUser user; private String validateUrl; - private String pollenUrl; protected UserAccountCreatedEmail(Locale locale) { super(locale); @@ -64,12 +63,4 @@ public class UserAccountCreatedEmail extends PollenMail { this.validateUrl = validateUrl; } - public String getPollenUrl() { - return pollenUrl; - } - - public void setPollenUrl(String pollenUrl) { - this.pollenUrl = pollenUrl; - } - } diff --git a/pollen-services/src/main/resources/email/ResendValidationEmail.mustache b/pollen-services/src/main/resources/email/ResendValidationEmail.mustache index dee428bb..e1d4af2b 100644 --- a/pollen-services/src/main/resources/email/ResendValidationEmail.mustache +++ b/pollen-services/src/main/resources/email/ResendValidationEmail.mustache @@ -1,7 +1,5 @@ Welcome {{user.name}}, -You had just created an account on the web application Pollen. +It seems that you did not receive the previous validation email, here is a new one. -You must validate your email on this url: {{validateUrl}} - -You can now manage your polls by logging on Pollen: {{pollenUrl}} \ No newline at end of file +You can validate your email address on this url: {{validateUrl}} diff --git a/pollen-services/src/main/resources/email/ResendValidationEmail_fr.mustache b/pollen-services/src/main/resources/email/ResendValidationEmail_fr.mustache index a4cec949..346deb94 100644 --- a/pollen-services/src/main/resources/email/ResendValidationEmail_fr.mustache +++ b/pollen-services/src/main/resources/email/ResendValidationEmail_fr.mustache @@ -1,7 +1,5 @@ Bonjour {{user.name}}, -Vous venez de créer un compte sur l'application en ligne Pollen +Il semblerait que vous n'ayez pas reçu le courriel de validation précédent, nous vous en renvoyons donc un nouveau. -Vous devez valider votre courriel en allant sur cette adresse : {{validateUrl}} - -Vous pouvez gérer vos sondages en vous connectant sur Pollen : {{pollenUrl}} \ No newline at end of file +Vous pouvez valider votre adresse électronique en allant sur cette adresse : {{validateUrl}} diff --git a/pollen-services/src/main/resources/email/UserAccountCreatedEmail.mustache b/pollen-services/src/main/resources/email/UserAccountCreatedEmail.mustache index eb5e4943..708d0898 100644 --- a/pollen-services/src/main/resources/email/UserAccountCreatedEmail.mustache +++ b/pollen-services/src/main/resources/email/UserAccountCreatedEmail.mustache @@ -1,9 +1,5 @@ Welcome {{user.name}}, -You have just created an account on the web application Pollen. +You have just created an account on the web application Pollen with teh following email address: {{user.email}} -Email: {{user.email}} - -You must validate your email on this url: {{validateUrl}} - -You can now manage your polls by logging on Pollen: {{pollenUrl}} \ No newline at end of file +You must validate your email address on the following url to activate your account: {{validateUrl}} diff --git a/pollen-services/src/main/resources/email/UserAccountCreatedEmail_fr.mustache b/pollen-services/src/main/resources/email/UserAccountCreatedEmail_fr.mustache index 78984533..d1c51c9f 100644 --- a/pollen-services/src/main/resources/email/UserAccountCreatedEmail_fr.mustache +++ b/pollen-services/src/main/resources/email/UserAccountCreatedEmail_fr.mustache @@ -1,9 +1,5 @@ Bonjour {{user.name}}, -Vous venez de créer un compte sur l'application en ligne Pollen +Vous venez de créer un compte sur l'application en ligne Pollen avec l'adresse suivante : {{user.email}} -Courriel: {{user.email}} - -Vous devez valider votre courriel en allant sur cette adresse : {{validateUrl}} - -Vous pouvez gérer vos sondages en vous connectant sur Pollen : {{pollenUrl}} \ No newline at end of file +Vous devez valider votre adresse électronique en allant sur l'adresse suivante pour activer votre compte : {{validateUrl}} diff --git a/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail.mustache b/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail.mustache index f04a0dba..c075e5a0 100644 --- a/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail.mustache +++ b/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail.mustache @@ -1,3 +1,5 @@ Hello {{user.name}}, -Your email address has successfully been validated. \ No newline at end of file +Your email address has successfully been validated. + +You can now manage your polls by logging on Pollen: {{pollenUrl}} \ No newline at end of file diff --git a/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail_fr.mustache b/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail_fr.mustache index 094dfa0e..f723c9f2 100644 --- a/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail_fr.mustache +++ b/pollen-services/src/main/resources/email/UserAccountEmailValidatedEmail_fr.mustache @@ -1,3 +1,5 @@ Bonjour {{user.name}}, -Votre adresse email a été validée. \ No newline at end of file +Votre adresse email a été validée. + +Vous pouvez gérer vos sondages en vous connectant sur Pollen : {{pollenUrl}} \ No newline at end of file diff --git a/pollen-ui-riot-js/src/main/web/i18n/en.json b/pollen-ui-riot-js/src/main/web/i18n/en.json index 4906fbb7..0a685c86 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/en.json +++ b/pollen-ui-riot-js/src/main/web/i18n/en.json @@ -197,15 +197,16 @@ "resendvalidation_cancel": "Cancel", "resendvalidation_action": "Send again", "resendvalidation_placeholder": "Fill your email", - "resendvalidation_sent": "A new invitation email was sent", + "resendvalidation_sent": "A new validation email was sent", "resendvalidation_error_emailNotFound": "Your email was not found", - "signcheck_title": "Validate your account", + "signcheck_title": "Validation of your email address", "signcheck_signin": "Sign in", - "signcheck_resendValidation": "Send a new invitation", + "signcheck_resendValidation": "Send a new validation email", "signcheck_message": "Your account must be validate before you can connect.", "signcheck_validating": "Your account is validating...", - "signcheck_validating_error": "Your account could not be validated, try to send a new invitation.", - "signcheck_validating_success": "Your account was validated! You can now sign in. Enjoy!", + "signcheck_validation_error": "Your email address could not be validated, try to send a new validation email.", + "signcheck_validation_success": "Your email address was validated!", + "signcheck_validation_signin": "You can now sign in. Enjoy!", "signin_title": "Connection", "signin_login": "Email", "signin_login_placeholder": "Enter your email", @@ -418,7 +419,7 @@ "userProfile_defaultEmailAddress": "Set as default email address", "userProfile_email_placeholder": "Enter your email address", "userProfile_emailValidate": "Validate", - "userProfile_resendValidation": "Send a new invitation", + "userProfile_resendValidation": "Send a new validation email", "userProfile_validationResent": "An email has been sent to {0}", "userProfile_addEmailAddress": "Add a new email address", "userProfile_deleteEmailAddress": "Delete the email address", diff --git a/pollen-ui-riot-js/src/main/web/i18n/fr.json b/pollen-ui-riot-js/src/main/web/i18n/fr.json index 6a2e2d5a..60d7782e 100644 --- a/pollen-ui-riot-js/src/main/web/i18n/fr.json +++ b/pollen-ui-riot-js/src/main/web/i18n/fr.json @@ -197,15 +197,16 @@ "resendvalidation_cancel": "Annuler", "resendvalidation_action": "Envoyer", "resendvalidation_placeholder": "Entrez votre adresse électronique", - "resendvalidation_sent": "Un nouveau courriel d'invitation a été envoyé", + "resendvalidation_sent": "Un nouveau courriel de validation a été envoyé", "resendvalidation_error_emailNotFound": "L'adresse électronique n'a pas été trouvé", - "signcheck_title": "Validation de votre compte", + "signcheck_title": "Validation de votre adresse électronique", "signcheck_signin": "Vous connecter", - "signcheck_resendValidation": "Envoyer une nouvelle invitation", + "signcheck_resendValidation": "Envoyer un nouveau courriel de validation", "signcheck_message": "Votre compte doit être validé afin de pouvoir vous connecter.", - "signcheck_validating": "Votre compte est en cour de validation...", - "signcheck_validating_error": "Votre compte n'a pas pu être validé, essayer de renvoyer une invitation.", - "signcheck_validating_success": "Votre compte a été validé. Vous pouvez vous connecter.", + "signcheck_validating": "Votre adresse électronique est en cour de validation...", + "signcheck_validation_error": "Votre adresse électronique n'a pas pu être validée, essayer de renvoyer un nouveau courriel de vaildation.", + "signcheck_validation_success": "Votre adresse électronique a été validée.", + "signcheck_validation_signin": "Vous pouvez désormais vous connecter.", "signin_title": "Connexion", "signin_login": "Email", "signin_login_placeholder": "Entrez votre email", diff --git a/pollen-ui-riot-js/src/main/web/tag/SignCheck.tag.html b/pollen-ui-riot-js/src/main/web/tag/SignCheck.tag.html index a9e9c5a4..64180650 100644 --- a/pollen-ui-riot-js/src/main/web/tag/SignCheck.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/SignCheck.tag.html @@ -29,15 +29,16 @@ {__.validating} <i class="fa fa-cog fa-spin fa-fw"></i> </div> - <div show={succes} class="c-alert c-alert--success"> - {__.validating_success} + <div show={success} class="c-alert c-alert--success"> + {__.validation_success} + <span if="{!session.isConnected()}">{__.validation_signin}</span> </div> <div show={error} class="c-alert c-alert--error"> - {__.validating_error} + {__.validation_error} </div> <div class="actions"> - <a show={succes} class="c-button c-button--info pull-right" + <a show={success && !session.isConnected()} class="c-button c-button--info pull-right" onclick={signin}> <i class="fa fa-sign-in" aria-hidden="true"></i> {__.signin} @@ -52,17 +53,17 @@ <script type="es6"> let authService = require("../js/AuthService"); - let session = require("../js/Session"); + this.session = require("../js/Session"); let route = require("riot-route"); - this.installBundle(session, "signcheck"); + this.installBundle(this.session, "signcheck"); this.waiting = true; this.error = false; - this.succes = false; + this.success = false; authService.validateEmail(this.opts.userId, this.opts.token) .then(() => { this.waiting = false; - this.succes = true; + this.success = true; this.update(); }) .catch(() => { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.