Merge branch 'develop'

This commit is contained in:
rascencio 2016-04-09 20:09:52 +02:00
commit de2f79e8ce
3 changed files with 60 additions and 1 deletions

View file

@ -2,6 +2,7 @@ from django import forms
from .models import Message
from django.template.loader import render_to_string
from django.core.mail import EmailMultiAlternatives
from django.utils.translation import ugettext_lazy as _
class ContactUsForm(forms.ModelForm):
@ -16,6 +17,12 @@ class ContactUsForm(forms.ModelForm):
'phone_number': forms.TextInput(attrs={'class': u'form-control'}),
'message': forms.Textarea(attrs={'class': u'form-control'}),
}
labels = {
'name': _('Name'),
'email': _('Email'),
'phone_number': _('Phone number'),
'message': _('Message'),
}
def send_email(self):
text_content = render_to_string('emails/contact.txt', {'data': self.cleaned_data})

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-09 02:43-0500\n"
"POT-Creation-Date: 2016-04-09 12:46-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -26,6 +26,58 @@ msgstr ""
msgid "Digital Glarus Supporters"
msgstr ""
#: forms.py:21
msgid "Name"
msgstr "Name"
#: forms.py:22
msgid "Email"
msgstr "Email"
#: forms.py:23
msgid "Phone number"
msgstr "Telefon"
#: forms.py:24
msgid "Message"
msgstr "Nachricht"
#: templates/glarus_blog/includes/blog_item.html:32
msgid "read more"
msgstr ""
#: templates/glarus_blog/includes/blog_meta.html:6
msgid "by"
msgstr ""
#: templates/glarus_blog/post_list.html:15
msgid "No article found."
msgstr ""
#: templates/glarus_blog/post_list.html:18
msgid "Back"
msgstr ""
#: templates/glarus_blog/post_list.html:23
msgid "previous"
msgstr ""
#: templates/glarus_blog/post_list.html:26
msgid "Page"
msgstr ""
#: templates/glarus_blog/post_list.html:26
msgid "of"
msgstr ""
#: templates/glarus_blog/post_list.html:29
msgid "next"
msgstr ""
#: templates/language_chooser.html:8
msgid "Change to language:"
msgstr ""
#: urls.py:8
msgid "contact/?$"
msgstr "kontakt/?$"