diff --git a/users/models.py b/users/models.py index 1e0db421..6b570337 100755 --- a/users/models.py +++ b/users/models.py @@ -809,7 +809,7 @@ class User( return None days = OptionalUser.get_cached_value("disable_emailnotyetconfirmed") - return str(self.email_change_date + timedelta(days=days)) + return self.email_change_date + timedelta(days=days) def confirm_email_address_mail(self, request): """Prend en argument un request, envoie un mail pour @@ -829,7 +829,8 @@ class User( reverse("users:process", kwargs={"token": req.token}) ), "expire_in": str(GeneralOption.get_cached_value("req_expire_hrs")), - "confirm_before": self.confirm_email_before_date(), + "confirm_before_fr": self.confirm_email_before_date().strftime("%d/%m/%Y"), + "confirm_before_en": self.confirm_email_before_date().strftime("%Y-%m-%d"), } send_mail( "Confirmation de l'email de %(name)s / Email confirmation for " diff --git a/users/templates/users/confirm_email.html b/users/templates/users/confirm_email.html index c90af524..6d562377 100644 --- a/users/templates/users/confirm_email.html +++ b/users/templates/users/confirm_email.html @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
diff --git a/users/templates/users/email_confirmation_request b/users/templates/users/email_confirmation_request index 65e20c13..8c5fe03d 100644 --- a/users/templates/users/email_confirmation_request +++ b/users/templates/users/email_confirmation_request @@ -11,7 +11,7 @@ Contactez les administrateurs si vous n'êtes pas à l'origine de cette requête Ce lien expirera dans {{ expire_in }} heures. S'il a expiré, vous pouvez renvoyer un mail de confirmation depuis votre compte {{ site_name }}. -Attention : Si vous ne confirmez pas votre email avant le {{ confirm_before }}, votre compte sera suspendu. +/!\ Attention : Si vous ne confirmez pas votre email avant le {{ confirm_before_fr }}, votre compte sera suspendu. Respectueusement, @@ -32,7 +32,7 @@ Contact the administrators if you didn't request this. This link will expire in {{ expire_in }} hours. If it has expired, you can send a new confirmation email from your account on {{ site_name }}. -Warning: If you do not confirm your email before {{ confirm_before }}, your account will be suspended. +/!\ Warning: If you do not confirm your email before {{ confirm_before_en }}, your account will be suspended. Regards, diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 84871045..1e52d61a 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% if users.state == users.STATE_EMAIL_NOT_YET_CONFIRMED %}