Skip to content
Snippets Groups Projects
Commit aa7f7b9c authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Send notification on registration

parent 83fe8dac
No related branches found
No related tags found
1 merge request!35Send notification on registration
Pipeline #84569 failed
{% load i18n %}
{% block subject %} {% trans "New account" %} {{ person }} {% endblock %}
{% block plain %}
{% blocktrans with new_event=new_event %}New account: {{ person }}{% endblocktrans %}
**** {% trans "Person" %} ****
* {% trans "Name" %}: {{ person }}
* {% trans "Username" %} {{ person.user.username }}
* {% trans "Date of birth" %}: {{ person.date_of_birth }}
* {% trans "Email address" %}: {{ person.email }}
* {% trans "Mobile number" %}: {{ person.mobile_number }}
* {% trans "Street" %}: {{ person.street }}
* {% trans "Housenumber" %}: {{ person.housenumber }}
* {% trans "Postal code" %}: {{ person.postal_code }}
* {% trans "Place" %}: {{ person.place }}
{% if person.guardians.first %}
**** {% trans "Guardian" %} ****
* {% trans "Name" %}: {{ person.guardians.first }}
* {% trans "Email address" %}: {{ person.guardians.first.email }}
* {% trans "Mobile number" %}: {{ person.guardians.first.mobile_number }}
{% endif %}
{% trans "Your AlekSIS team" %}
{% endblock %}
{% block html %}
<main>
<p>{% trans "New account": %} {{ person }}</p>
<blockquote>
<h5>{% trans "Person" %}</h5>
<ul>
<li>{% trans "Name" %}: {{ person }}</li>
<li>{% trans "Username" %}: {{ person.user.username }}</li>
<li>{% trans "Date of birth" %}: {{ person.date_of_birth }}</li>
<li>{% trans "Email address" %}: {{ person.email }}</li>
<li>{% trans "Mobile number" %}: {{ person.mobile_number }}</li>
<li>{% trans "Street" %}: {{ person.street }}</li>
<li>{% trans "Housenumber" %}: {{ person.housenumber }}</li>
<li>{% trans "Postal code" %}: {{ person.postal_code }}</li>
<li>{% trans "Place" %}: {{ person.place }}</li>
</ul>
{% end person.guardians.first %}
<h5>{% trans "Guardian" %}</h5>
<ul>
<li>{% trans "Name" %}: {{ person.guardians.first }}</li>
<li>{% trans "Email address" %}: {{ person.guardians.first.email }}</li>
<li>{% trans "Mobile number" %}: {{ person.guardians.first.mobile_number }}</li>
</ul>
{% endif %}
</blockquote>
<p>
<i>{% trans "Your AlekSIS team" %}</i>
</p>
</main>
{% endblock %}
......@@ -335,6 +335,7 @@ class AccountRegisterWizardView(SessionWizardView):
def done(self, form_list, **kwargs):
context = {}
cleaned_data_email = self.get_cleaned_data_for_step("email")
cleaned_data_register = self.get_cleaned_data_for_step("register")
......@@ -366,6 +367,21 @@ class AccountRegisterWizardView(SessionWizardView):
},
)
context["person"] = person
send_templated_mail(
template_name="account_registered",
from_email=get_site_preferences()["mail__address"],
recipient_list='root@teckids.org',
headers={
"reply_to": [
person.email,
],
"X-Zammad-Customer-Email": person.email,
},
context=context,
)
return redirect("index")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment