newsletter checkboxes in suggestions and registration
[wolnelektury.git] / src / suggest / views.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.core.urlresolvers import reverse_lazy
6 from django.utils.translation import ugettext_lazy as _
7
8 from ajaxable.utils import AjaxableFormView
9 from suggest import forms
10
11
12 class PublishingSuggestionFormView(AjaxableFormView):
13     form_class = forms.PublishingSuggestForm
14     title = _("Didn't find a book? Make a suggestion.")
15     template = "publishing_suggest.html"
16     submit = _('Send report')
17     success_message = _('Report was sent successfully.')
18     honeypot = True
19     action = reverse_lazy('suggest_publishing')
20
21
22 class SuggestionFormView(AjaxableFormView):
23     form_class = forms.SuggestForm
24     title = _('Report a bug or suggestion')
25     template = "suggest.html"
26     submit = _('Send report')
27     success_message = _('Report was sent successfully.')
28     honeypot = True
29     action = reverse_lazy('suggest')