registration: special case activation link being valid for 1 day (#25075)

This commit is contained in:
Frédéric Péters 2018-07-05 14:01:12 +02:00
parent b17c410f19
commit 632f81b208
3 changed files with 17 additions and 2 deletions

View File

@ -11,7 +11,11 @@
</p>
{% endif %}
{% if expiration_days > 1 %}
<p>{% blocktrans %}This link is valid for {{ expiration_days }} days.{% endblocktrans %}</>
{% else %}
<p>{% blocktrans %}This link is valid for 24 hours.{% endblocktrans %}</>
{% endif %}
<p>{% blocktrans %}If you did not register on {{ site }}, ignore this email.{% endblocktrans %}</p>
</body>

View File

@ -8,6 +8,8 @@ You already have an account. To login please go to:
{{ registration_url }}
{% endblocktrans %}{% endif %}{% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %}
{% endblocktrans %}{% endif %}
{% if expiration_days > 1 %}{% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %}
{% else %}{% blocktrans %}Link is valid for 24 hours.{% endblocktrans %}{% endif %}
{% blocktrans %}If you did not register on {{ site }}, ignore this email.{% endblocktrans %}{% endautoescape %}

View File

@ -9,8 +9,17 @@
{% url "auth_homepage" as homepage_url %}
{% blocktrans with email=request.session.registered_email %}
<p>An email was sent to {{ email }}.</p>
{% endblocktrans %}
{% if account_activation_days > 1 %}
{% blocktrans %}
<p>Follow instruction in this email to continue your registration, this
email will be valid during {{account_activation_days}} days.</p>
<p><a href="{{ homepage_url }}">Back</a></p>
{% endblocktrans %}
{% else %}
{% blocktrans %}
<p>Follow instruction in this email to continue your registration, this
email will be valid during 24 hours.</p>
{% endblocktrans %}
{% endif %}
<p><a href="{{ homepage_url }}">{% trans "Back" %}</a></p>
{% endblock %}