mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 03:13:12 +00:00
Improve various templates related to email confirmation
This commit is contained in:
parent
e0609d27dd
commit
0c1cf9ac94
4 changed files with 7 additions and 6 deletions
|
@ -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 "
|
||||
|
|
|
@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h4>{% blocktrans %}Confirmation email{% endblocktrans %}</h4>
|
||||
<p>{% blocktrans %}Confirm the email{% endblocktrans %} <a href="mailto:{{ email }}">{{ email }}</a> {% blocktrans %}for user {{ firstname }} {{ lastname }}.{% endblocktrans %}</p>
|
||||
<p>{% blocktrans %}Confirm the email{% endblocktrans %} <a href="mailto:{{ email }}">{{ email }}</a> {% blocktrans %}for {{ firstname }} {{ lastname }}.{% endblocktrans %}</p>
|
||||
{% trans "Confirm" as tr_confirm %}
|
||||
{% bootstrap_button tr_confirm button_type="submit" icon="ok" button_class="btn-success" %}
|
||||
</form>
|
||||
|
|
|
@ -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 }}.
|
||||
|
||||
<strong>Attention :</strong> 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 }}.
|
||||
|
||||
<strong>Warning:</strong> 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,
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans %}Please confirm your email address before {{ users.confirm_email_before_date }}, or your account will be suspended.{% endblocktrans %}
|
||||
{% blocktrans with confirm_before_date=users.confirm_email_before_date|date:"DATE_FORMAT" %}Please confirm your email address before {{ confirm_before_date }}, or your account will be suspended.{% endblocktrans %}
|
||||
<br/>
|
||||
<a href="{% url 'users:resend-confirmation-email' users.id %}">
|
||||
{% blocktrans %}Didn't receive the email?{% endblocktrans %}
|
||||
|
|
Loading…
Reference in a new issue