Add Member application emails
This commit is contained in:
Binary file not shown.
+134
-16
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-26 17:32+0200\n"
|
||||
"POT-Creation-Date: 2019-09-16 19:33+0300\n"
|
||||
"PO-Revision-Date: 2017-11-02 23:09+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -634,6 +634,14 @@ msgid "Hienoa! Jäsenhakemuksesi on nyt lähetetty."
|
||||
msgstr "Amazing! Your membership application has been sent."
|
||||
|
||||
#: members/templates/application_success.html:9
|
||||
msgid ""
|
||||
"Vahvistusviesti on lähetetty sähköpostiisi. Ota yhteyttä sik-vtmk@list.ayy."
|
||||
"fi jos viestiä ei näy."
|
||||
msgstr ""
|
||||
"Confirmation email is sent to given email address. Contact sik-vtmk@list.ayy."
|
||||
"fi if you didn't receive it."
|
||||
|
||||
#: members/templates/application_success.html:10
|
||||
msgid "Takaisin Sähköinsinöörikillan web-sivuille"
|
||||
msgstr "Back to the front page"
|
||||
|
||||
@@ -687,6 +695,107 @@ msgstr "Application form"
|
||||
msgid "Settings"
|
||||
msgstr "Settings"
|
||||
|
||||
#: members/templates/email_application_accept.html:2
|
||||
#, fuzzy
|
||||
#| msgid "Moikka"
|
||||
msgid "Moi"
|
||||
msgstr "Hi"
|
||||
|
||||
#: members/templates/email_application_accept.html:4
|
||||
msgid "Onnittelut! Sinut on hyväksytty Sähköinsinöörikillan jäseneksi."
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:6
|
||||
#, fuzzy
|
||||
#| msgid "Käy kurkkaamassa muutkin haasteet osoitteessa"
|
||||
msgid "Käy kurkkaamassa killan nettisivuilta"
|
||||
msgstr "Also go and check other challenges at"
|
||||
|
||||
#: members/templates/email_application_accept.html:6
|
||||
msgid ""
|
||||
"tulevia tapahtumia ja piipahda kiltahuoneella tutustumassa uusiin "
|
||||
"kiltatovereihisi!"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:8
|
||||
msgid "Liity myös killan TG-kanaville"
|
||||
msgstr "Join Guild's Telegram channels"
|
||||
|
||||
#: members/templates/email_application_accept.html:9
|
||||
msgid "SIK"
|
||||
msgstr "SIK"
|
||||
|
||||
#: members/templates/email_application_accept.html:10
|
||||
msgid "SIK-fuksit 2019"
|
||||
msgstr "SIK Freshmen 2019"
|
||||
|
||||
#: members/templates/email_application_accept.html:11
|
||||
msgid "SIK-fuksit 2019 -tiedotuskanava"
|
||||
msgstr "SIK Freshmen 2019 Notification channel"
|
||||
|
||||
#: members/templates/email_application_submit.html:2
|
||||
#: ohlhafv/templates/email.html:2
|
||||
msgid "Moikka"
|
||||
msgstr "Hi"
|
||||
|
||||
#: members/templates/email_application_submit.html:4
|
||||
msgid ""
|
||||
"Sait tämän viestin, sillä olet lähettänyt hakemuksen Aalto-yliopiston "
|
||||
"Sähköinsinöörikillan jäseneksi alla olevin tiedoin. Siistiä!"
|
||||
msgstr ""
|
||||
"You received this email, since you sent a membership application to the "
|
||||
"Guild of Electrical Engineering. That's so cool!"
|
||||
|
||||
#: members/templates/email_application_submit.html:6
|
||||
msgid "Etunimi"
|
||||
msgstr "First name"
|
||||
|
||||
#: members/templates/email_application_submit.html:7
|
||||
msgid "Sukunimi"
|
||||
msgstr "Last name"
|
||||
|
||||
#: members/templates/email_application_submit.html:8
|
||||
msgid "Sähköposti"
|
||||
msgstr "Email"
|
||||
|
||||
#: members/templates/email_application_submit.html:9
|
||||
msgid "Kotipaikkakunta"
|
||||
msgstr "Place of origin"
|
||||
|
||||
#: members/templates/email_application_submit.html:10
|
||||
msgid "AYY:n jäsen"
|
||||
msgstr "Member of AYY"
|
||||
|
||||
#: members/templates/email_application_submit.html:11
|
||||
msgid "Haluan jäsenmailin"
|
||||
msgstr "I want to receive weekly member email"
|
||||
|
||||
#: members/templates/email_application_submit.html:13
|
||||
msgid ""
|
||||
"Saat sähköpostiisi tiedon, kun sinut on hallituksen kokouksessa hyväksytty "
|
||||
"jäseneksi"
|
||||
msgstr "You will be notified via email once your application has been accepted"
|
||||
|
||||
#: members/templates/email_application_submit.html:15
|
||||
msgid "Muistathan maksaa jäsenmaksun! Alla maksutiedot"
|
||||
msgstr "Don't forget to pay your membership fee!"
|
||||
|
||||
#: members/templates/email_application_submit.html:17
|
||||
msgid "Saaja"
|
||||
msgstr "Recepient"
|
||||
|
||||
#: members/templates/email_application_submit.html:18
|
||||
msgid "Tilinumero"
|
||||
msgstr "Account number"
|
||||
|
||||
#: members/templates/email_application_submit.html:20
|
||||
msgid "Viite"
|
||||
msgstr "Reference Number"
|
||||
|
||||
#: members/templates/email_application_submit.html:21
|
||||
msgid "Summa"
|
||||
msgstr "Amount"
|
||||
|
||||
#: members/templates/member_add.html:15 members/templates/member_edit.html:18
|
||||
#: members/templates/payment_add.html:20 members/templates/payment_edit.html:18
|
||||
msgid "Save"
|
||||
@@ -812,32 +921,48 @@ msgstr "Finnish"
|
||||
msgid "English"
|
||||
msgstr "English"
|
||||
|
||||
#: members/views/applications.py:51 members/views/applications.py:112
|
||||
#: members/views/applications.py:137
|
||||
#: members/views/applications.py:54 members/views/applications.py:125
|
||||
#: members/views/applications.py:150
|
||||
msgid "No application id specified"
|
||||
msgstr "No application id specified"
|
||||
|
||||
#: members/views/applications.py:71
|
||||
#: members/views/applications.py:74
|
||||
msgid "Application missing 'id' field."
|
||||
msgstr "Application missing 'id' field."
|
||||
|
||||
#: members/views/applications.py:80
|
||||
#: members/views/applications.py:83
|
||||
msgid "Email {} is already in use by a member. Application cannot be accepted."
|
||||
msgstr ""
|
||||
"Email {} is already in use by a member. Application cannot be accepted."
|
||||
|
||||
#: members/views/applications.py:91
|
||||
#: members/views/applications.py:94
|
||||
msgid "Successfully accepted application"
|
||||
msgstr "Successfully accepted application"
|
||||
|
||||
#: members/views/applications.py:116
|
||||
#: members/views/applications.py:97
|
||||
msgid "Jäsenhakemuksesi Sähköinsinöörikiltaan on hyväksytty!"
|
||||
msgstr ""
|
||||
|
||||
#: members/views/applications.py:129
|
||||
msgid "Successfully deleted application"
|
||||
msgstr "Successfully deleted application"
|
||||
|
||||
#: members/views/applications.py:126
|
||||
#: members/views/applications.py:139
|
||||
msgid "Could not delete application object"
|
||||
msgstr "Could not delete application object"
|
||||
|
||||
#: members/views/applications.py:177
|
||||
msgid "Jäsenhakemuksesi Sähköinsinöörikiltaan on lähetetty onnistuneesti!"
|
||||
msgstr "Your membership application was sent successfully!"
|
||||
|
||||
#: members/views/applications.py:182 members/views/applications.py:183
|
||||
msgid "Kyllä"
|
||||
msgstr "Yes"
|
||||
|
||||
#: members/views/applications.py:182 members/views/applications.py:183
|
||||
msgid "Ei"
|
||||
msgstr "No"
|
||||
|
||||
#: members/views/members.py:86 members/views/members.py:188
|
||||
#: members/views/members.py:212
|
||||
msgid "No member id specified"
|
||||
@@ -932,10 +1057,6 @@ msgstr ""
|
||||
msgid "Ohlhafv challenge: {} vs. {}"
|
||||
msgstr ""
|
||||
|
||||
#: ohlhafv/templates/email.html:2
|
||||
msgid "Moikka"
|
||||
msgstr "Hi"
|
||||
|
||||
#: ohlhafv/templates/email.html:4
|
||||
msgid "on haastanut sinut oluenjuontimittelöön"
|
||||
msgstr "has challenged you to a beer drinking contest"
|
||||
@@ -945,12 +1066,9 @@ msgid "-sarjassa"
|
||||
msgstr "series"
|
||||
|
||||
#: ohlhafv/templates/email.html:8
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Muistattehan vahvistaa haasteen paikan päällä Smökissä torstaina 15.2"
|
||||
msgid "Muistattehan vahvistaa haasteen paikan päällä Smökissä torstaina 14.2"
|
||||
msgstr ""
|
||||
"Remeber to confirm the challenge at Smökki on Thursday 15.2. at the event"
|
||||
"Remeber to confirm the challenge at Smökki on Thursday 14.2. at the event"
|
||||
|
||||
#: ohlhafv/templates/email.html:10
|
||||
msgid "Käy kurkkaamassa muutkin haasteet osoitteessa"
|
||||
|
||||
Binary file not shown.
+129
-12
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-03-26 17:32+0200\n"
|
||||
"POT-Creation-Date: 2019-09-16 19:33+0300\n"
|
||||
"PO-Revision-Date: 2017-11-02 23:04+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -632,6 +632,12 @@ msgid "Hienoa! Jäsenhakemuksesi on nyt lähetetty."
|
||||
msgstr "Hienoa! Jäsenhakemuksesi on nyt lähetetty."
|
||||
|
||||
#: members/templates/application_success.html:9
|
||||
msgid ""
|
||||
"Vahvistusviesti on lähetetty sähköpostiisi. Ota yhteyttä sik-vtmk@list.ayy."
|
||||
"fi jos viestiä ei näy."
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/application_success.html:10
|
||||
msgid "Takaisin Sähköinsinöörikillan web-sivuille"
|
||||
msgstr "Takaisin Sähköinsinöörikillan web-sivuille"
|
||||
|
||||
@@ -685,6 +691,103 @@ msgstr "Jäsenhakemuslomake"
|
||||
msgid "Settings"
|
||||
msgstr "Asetukset"
|
||||
|
||||
#: members/templates/email_application_accept.html:2
|
||||
msgid "Moi"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:4
|
||||
msgid "Onnittelut! Sinut on hyväksytty Sähköinsinöörikillan jäseneksi."
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:6
|
||||
msgid "Käy kurkkaamassa killan nettisivuilta"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:6
|
||||
msgid ""
|
||||
"tulevia tapahtumia ja piipahda kiltahuoneella tutustumassa uusiin "
|
||||
"kiltatovereihisi!"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:8
|
||||
msgid "Liity myös killan TG-kanaville"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:9
|
||||
msgid "SIK"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:10
|
||||
msgid "SIK-fuksit 2019"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_accept.html:11
|
||||
msgid "SIK-fuksit 2019 -tiedotuskanava"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:2
|
||||
#: ohlhafv/templates/email.html:2
|
||||
msgid "Moikka"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:4
|
||||
msgid ""
|
||||
"Sait tämän viestin, sillä olet lähettänyt hakemuksen Aalto-yliopiston "
|
||||
"Sähköinsinöörikillan jäseneksi alla olevin tiedoin. Siistiä!"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:6
|
||||
msgid "Etunimi"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:7
|
||||
msgid "Sukunimi"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:8
|
||||
msgid "Sähköposti"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:9
|
||||
msgid "Kotipaikkakunta"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:10
|
||||
msgid "AYY:n jäsen"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:11
|
||||
msgid "Haluan jäsenmailin"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:13
|
||||
msgid ""
|
||||
"Saat sähköpostiisi tiedon, kun sinut on hallituksen kokouksessa hyväksytty "
|
||||
"jäseneksi"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:15
|
||||
#, fuzzy
|
||||
#| msgid "Muista myös maksaa jäsenmaksusi!"
|
||||
msgid "Muistathan maksaa jäsenmaksun! Alla maksutiedot"
|
||||
msgstr "Muista myös maksaa jäsenmaksusi!"
|
||||
|
||||
#: members/templates/email_application_submit.html:17
|
||||
msgid "Saaja"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:18
|
||||
msgid "Tilinumero"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:20
|
||||
msgid "Viite"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/email_application_submit.html:21
|
||||
msgid "Summa"
|
||||
msgstr ""
|
||||
|
||||
#: members/templates/member_add.html:15 members/templates/member_edit.html:18
|
||||
#: members/templates/payment_add.html:20 members/templates/payment_edit.html:18
|
||||
msgid "Save"
|
||||
@@ -808,31 +911,49 @@ msgstr "suomi"
|
||||
msgid "English"
|
||||
msgstr "englanti"
|
||||
|
||||
#: members/views/applications.py:51 members/views/applications.py:112
|
||||
#: members/views/applications.py:137
|
||||
#: members/views/applications.py:54 members/views/applications.py:125
|
||||
#: members/views/applications.py:150
|
||||
msgid "No application id specified"
|
||||
msgstr "Hakemuksen ID ei määritelty"
|
||||
|
||||
#: members/views/applications.py:71
|
||||
#: members/views/applications.py:74
|
||||
msgid "Application missing 'id' field."
|
||||
msgstr "Hakemuksen ID ei määritelty."
|
||||
|
||||
#: members/views/applications.py:80
|
||||
#: members/views/applications.py:83
|
||||
msgid "Email {} is already in use by a member. Application cannot be accepted."
|
||||
msgstr "Sähköpostiosoite {} on jo käytössä. Hakemusta ei hyväksytty."
|
||||
|
||||
#: members/views/applications.py:91
|
||||
#: members/views/applications.py:94
|
||||
msgid "Successfully accepted application"
|
||||
msgstr "Onnistuneesti hyväksyttiin hakemus"
|
||||
|
||||
#: members/views/applications.py:116
|
||||
#: members/views/applications.py:97
|
||||
msgid "Jäsenhakemuksesi Sähköinsinöörikiltaan on hyväksytty!"
|
||||
msgstr ""
|
||||
|
||||
#: members/views/applications.py:129
|
||||
msgid "Successfully deleted application"
|
||||
msgstr "Onnistuneesti poistettiin hakemus"
|
||||
|
||||
#: members/views/applications.py:126
|
||||
#: members/views/applications.py:139
|
||||
msgid "Could not delete application object"
|
||||
msgstr "Hakemusobjektia ei voitu poistaa"
|
||||
|
||||
#: members/views/applications.py:177
|
||||
msgid "Jäsenhakemuksesi Sähköinsinöörikiltaan on lähetetty onnistuneesti!"
|
||||
msgstr ""
|
||||
|
||||
#: members/views/applications.py:182 members/views/applications.py:183
|
||||
msgid "Kyllä"
|
||||
msgstr ""
|
||||
|
||||
#: members/views/applications.py:182 members/views/applications.py:183
|
||||
#, fuzzy
|
||||
#| msgid "Edit"
|
||||
msgid "Ei"
|
||||
msgstr "Muokkaa"
|
||||
|
||||
#: members/views/members.py:86 members/views/members.py:188
|
||||
#: members/views/members.py:212
|
||||
msgid "No member id specified"
|
||||
@@ -927,10 +1048,6 @@ msgstr "Sarja"
|
||||
msgid "Ohlhafv challenge: {} vs. {}"
|
||||
msgstr "Ohlhafv-haaste: {} vs. {}"
|
||||
|
||||
#: ohlhafv/templates/email.html:2
|
||||
msgid "Moikka"
|
||||
msgstr ""
|
||||
|
||||
#: ohlhafv/templates/email.html:4
|
||||
msgid "on haastanut sinut oluenjuontimittelöön"
|
||||
msgstr ""
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
{% block content %}
|
||||
<link rel="stylesheet" href="{% static "css/application.css" %}">
|
||||
<h3>{% trans "Hienoa! Jäsenhakemuksesi on nyt lähetetty." %}</h3>
|
||||
<p>{% trans "Vahvistusviesti on lähetetty sähköpostiisi. Ota yhteyttä sik-vtmk@list.ayy.fi jos viestiä ei näy." %}</p>
|
||||
<a href="/"><h4>{% trans "Takaisin Sähköinsinöörikillan web-sivuille" %}</h4></a>
|
||||
{% endblock content %}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{% load i18n %}
|
||||
{% trans "Moi" %} {{ first_name }}!
|
||||
|
||||
{% trans "Onnittelut! Sinut on hyväksytty Sähköinsinöörikillan jäseneksi." %}
|
||||
|
||||
{% trans "Käy kurkkaamassa killan nettisivuilta" %} (https://sik.ayy.fi) {% trans "tulevia tapahtumia ja piipahda kiltahuoneella tutustumassa uusiin kiltatovereihisi!" %}
|
||||
|
||||
{% trans "Liity myös killan TG-kanaville" %}:
|
||||
{% trans "SIK" %}: https://t.me/joinchat/A6EViD5FCWLxPcXCggY7hw
|
||||
{% trans "SIK-fuksit 2019" %}: http://tinyurl.com/sikfuksit19-tg
|
||||
{% trans "SIK-fuksit 2019 -tiedotuskanava" %}: http://tinyurl.com/sikfuksit19-tiedotus
|
||||
@@ -0,0 +1,21 @@
|
||||
{% load i18n %}
|
||||
{% trans "Moikka" %} {{ application.first_name }},
|
||||
|
||||
{% trans "Sait tämän viestin, sillä olet lähettänyt hakemuksen Aalto-yliopiston Sähköinsinöörikillan jäseneksi alla olevin tiedoin. Siistiä!" %}
|
||||
|
||||
{% trans "Etunimi" %}: {{ application.first_name }}
|
||||
{% trans "Sukunimi" %}: {{ application.last_name }}
|
||||
{% trans "Sähköposti" %}: {{ application.email }}
|
||||
{% trans "Kotipaikkakunta" %}: {{ application.POR }}
|
||||
{% trans "AYY:n jäsen" %}: {{ ayy }}
|
||||
{% trans "Haluan jäsenmailin" %}: {{ jas }}
|
||||
|
||||
{% trans "Saat sähköpostiisi tiedon, kun sinut on hallituksen kokouksessa hyväksytty jäseneksi" %}.
|
||||
|
||||
{% trans "Muistathan maksaa jäsenmaksun! Alla maksutiedot" %}:
|
||||
|
||||
{% trans "Saaja" %}: Aalto-yliopiston Sähköinsinöörikilta ry
|
||||
{% trans "Tilinumero" %}: FI97 1309 3000 1118 23
|
||||
BIC: NDEAFIHH
|
||||
{% trans "Viite" %}: 1313
|
||||
{% trans "Summa" %}: 8 €
|
||||
@@ -7,10 +7,13 @@ from django.core.mail import send_mail
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.forms.models import model_to_dict
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
import logging
|
||||
import html
|
||||
|
||||
from webapp.utils import send_email
|
||||
|
||||
from members.views.utils import *
|
||||
from members.tables import RequestTable
|
||||
from members.forms import ApplicationForm
|
||||
@@ -90,6 +93,16 @@ def application_accept(request, *args, **kwargs):
|
||||
.format(form))
|
||||
notification = "{} {}.".format(_("Successfully accepted application"),
|
||||
str(application))
|
||||
|
||||
subject = _('Jäsenhakemuksesi Sähköinsinöörikiltaan on hyväksytty!')
|
||||
|
||||
message = render_to_string(
|
||||
'members:email_application_accept.html', {
|
||||
'first_name': application.first_name
|
||||
}
|
||||
)
|
||||
send_email(member.email, subject, message)
|
||||
|
||||
return HttpResponseRedirect(
|
||||
'/members/list?notification={}'.format(html.escape(notification)))
|
||||
except Exception as ex:
|
||||
@@ -157,6 +170,21 @@ def application_submit(request, *args, **kwargs):
|
||||
form = ApplicationForm(request.POST)
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
return render(request, 'application_success.html', {})
|
||||
try:
|
||||
application = form.instance
|
||||
email = form.cleaned_data.get('email', '')
|
||||
|
||||
subject = _('Jäsenhakemuksesi Sähköinsinöörikiltaan on lähetetty onnistuneesti!')
|
||||
|
||||
message = render_to_string(
|
||||
'members:email_application_submit.html', {
|
||||
'application': application,
|
||||
'ayy': _('Kyllä') if application.AYY else _('Ei'),
|
||||
'jas': _('Kyllä') if application.jas else _('Ei')
|
||||
}
|
||||
)
|
||||
send_email(email, subject, message)
|
||||
finally:
|
||||
return render(request, 'application_success.html', {})
|
||||
else:
|
||||
return error_view(request, form.errors)
|
||||
|
||||
Reference in New Issue
Block a user