src/templates/auth/messages/password-reset.txt \
src/templates/auth/messages/profile-setup.txt \
src/templates/auth/messages/profile-setup-2.txt \
+ src/templates/auth/messages/register.html \
src/templates/auth/messages/register.txt
templates_auth_messagesdir = $(templates_authdir)/messages
from . import accounts
from . import misc
+from . import util
from .decorators import *
class Messages(misc.Object):
"""
account = self.backend.accounts.get_by_mail(recipient)
- return self.send_template(template, recipients=[recipient,],
- account=account)
+ kwargs = {
+ "account" : account,
+ "first_name" : account.first_name,
+ "last_name" : account.last_name,
+ "uid" : account.uid,
+ "email" : account.email,
+
+ # Random activation/reset codes
+ "activation_code" : util.random_string(36),
+ "reset_code" : util.random_string(64),
+ }
+
+ return self.send_template(template, recipients=[recipient,], **kwargs)
class Queue(misc.Object):
--- /dev/null
+{% extends "../../messages/base.html" %}
+
+{% block content %}
+ <p>
+ <strong>{{ _("Hello %s!") % first_name }}</strong>
+ </p>
+
+ <p>
+ {{ _("Thank you for registering a new account with us.") }}
+ </p>
+
+ <p>
+ {{ _("This account will allow you to take part in our project. Either by joining conversations, writing documentation, or becoming a developer.") }} {{ _("There are many things you can do with your account.") }}
+ </p>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
+ <tbody>
+ <tr>
+ <td align="left">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <td>
+ <a href="https://people.ipfire.org/activate/{{ uid }}/{{ activation_code }}" target="_blank">{{ _("Activate Account") }}</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+{% end block %}
{{ _("Hello %s!") % first_name }}
-{{ _("Thank you for registering a new account with us.") }} {{ _("This account will allow you to take part in our project. Either by joining conversations, writing documentation, or becoming a developer.") }} {{ _("There is many things you can do with your account.") }}
+{{ _("Thank you for registering a new account with us.") }}
+
+{{ _("This account will allow you to take part in our project. Either by joining conversations, writing documentation, or becoming a developer.") }} {{ _("There are many things you can do with your account.") }}
{{ _("To activate it, please click on this link:") }}