From f0c50ea6624c1c518f2e1f2ca3262bb277e8e292 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Wed, 25 Jul 2012 19:54:58 +0200 Subject: [PATCH] Website: Updated contact form function. --- extras/website/website/templates/contact-form.html | 8 ++++++-- extras/website/website/templates/contact.html | 4 ++-- .../website/website/templates/thanks-contact.html | 12 ++++++++++++ extras/website/website/urls.py | 6 +----- extras/website/website/views.py | 13 +++---------- 5 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 extras/website/website/templates/thanks-contact.html diff --git a/extras/website/website/templates/contact-form.html b/extras/website/website/templates/contact-form.html index 4d07ada5c..d9d920c56 100644 --- a/extras/website/website/templates/contact-form.html +++ b/extras/website/website/templates/contact-form.html @@ -8,7 +8,9 @@ {% block mainmenu_contact %}active{% endblock %} {% block lead %} -Nehmen Sie Kontakt zu uns auf! +Haben Sie Fragen oder Anregungen zu OpenSlides? +Sie können hier das Hauptentwicklerteam direkt kontaktieren. +Wir freuen uns auf Ihre Anfrage! {% endblock %} {% block content %} @@ -16,7 +18,9 @@ Nehmen Sie Kontakt zu uns auf!
{% csrf_token %} {{ form.name_of_field.errors }} {{ form.as_p }} - +
{% endblock %} diff --git a/extras/website/website/templates/contact.html b/extras/website/website/templates/contact.html index 1751cc16e..c78f199a2 100644 --- a/extras/website/website/templates/contact.html +++ b/extras/website/website/templates/contact.html @@ -36,8 +36,8 @@ uns Ihre Rückmeldung! Archiv »


commit@openslides.orgHG-commit-Mailingliste von hg.openslides.org (moderiert), für Entwickler

-

Abonnieren » - Archiv »

+

Abonnieren » + Archiv »

Hinweis: Bitte abonnieren Sie eine Mailingliste bevor Sie an diese schreiben!

diff --git a/extras/website/website/templates/thanks-contact.html b/extras/website/website/templates/thanks-contact.html new file mode 100644 index 000000000..a3b1eca4b --- /dev/null +++ b/extras/website/website/templates/thanks-contact.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% load i18n %} + +{% block title %}{{ block.super }} - Absendebestätigung{% endblock %} +{% block headline %}Vielen Dank!{% endblock %} + +{% block mainmenu_pricing %}active{% endblock %} + +{% block lead %} +Vielen Dank für Ihre Nachricht! +{% endblock %} diff --git a/extras/website/website/urls.py b/extras/website/website/urls.py index f78af4ede..0fb96fde1 100644 --- a/extras/website/website/urls.py +++ b/extras/website/website/urls.py @@ -5,11 +5,6 @@ from django.views.generic import TemplateView from website import views -#from views import TemplateView -# Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() - urlpatterns = i18n_patterns('', url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^$', TemplateView.as_view(template_name="home.html"), name='home',), @@ -27,6 +22,7 @@ urlpatterns = i18n_patterns('', url(r'^development/$', TemplateView.as_view(template_name="development.html"), name='development',), url(r'^contact/$', TemplateView.as_view(template_name="contact.html"), name='contact',), url(r'^contact/form$', 'website.views.contactform', name='contactform',), + url(r'^contact/thanks$', TemplateView.as_view(template_name="thanks-contact.html"), name='thankscontact',), url(r'^donate/$', TemplateView.as_view(template_name="donate.html"), name='donate',), url(r'^demo/$', TemplateView.as_view(template_name="demo.html"), name='demo',), url(r'^impressum/$', TemplateView.as_view(template_name="impressum.html"), name='impressum',), diff --git a/extras/website/website/views.py b/extras/website/website/views.py index f63653f35..f6970ce98 100644 --- a/extras/website/website/views.py +++ b/extras/website/website/views.py @@ -1,7 +1,7 @@ -#from django.views.generic import TemplateView from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, render + from website.forms import ContactForm, OrderEventForm, OrderContactForm def contactform(request): @@ -12,12 +12,12 @@ def contactform(request): message = form.cleaned_data['message'] sender = form.cleaned_data['sender'] cc_myself = form.cleaned_data['cc_myself'] - recipients = ['emanuel@intevation.de'] + recipients = ['support@openslides.org'] if cc_myself: recipients.append(sender) from django.core.mail import send_mail send_mail(subject, message, sender, recipients) - return HttpResponseRedirect(reverse('contact')) + return HttpResponseRedirect(reverse('thankscontact')) else: form = ContactForm() return render(request, 'contact-form.html', { @@ -46,7 +46,6 @@ def orderform(request, package): contact_email = form_contact.cleaned_data['contact_email'] # mail recipients = ['emanuel@intevation.de'] -# recipients.append(contact_email) message = "Neue Bestellung: OpenSlides Paket #%s\n\n"\ "Veranstaltungsname: %s\n"\ "Kurzbeschreibung der Veranstaltung: %s\n"\ @@ -66,12 +65,6 @@ def orderform(request, package): contact_email) from django.core.mail import send_mail send_mail("Bestellung OpenSlides-Supportpaket", message, contact_email, recipients) - print message - #for key in request.POST: - # value = request.POST['key'] - # loop through keys and values - #for key, value in request.POST.iteritems(): - # print key, value return HttpResponseRedirect(reverse('thanksorder')) else: