Fundraising in PDF.
[wolnelektury.git] / src / suggest / views.py
1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from django.urls import reverse_lazy
5 from django.utils.translation import gettext_lazy as _
6
7 from ajaxable.utils import AjaxableFormView
8 from suggest import forms
9
10
11 class PublishingSuggestionFormView(AjaxableFormView):
12     form_class = forms.PublishingSuggestForm
13     title = _("Nie ma utworu na stronie? Zgłoś sugestię.")
14     template = "publishing_suggest.html"
15     submit = _('Wyślij zgłoszenie')
16     success_message = _('Zgłoszenie zostało wysłane.')
17     honeypot = True
18     action = reverse_lazy('suggest_publishing')
19
20
21 class SuggestionFormView(AjaxableFormView):
22     form_class = forms.SuggestForm
23     title = _('Zgłoś błąd lub sugestię')
24     template = "suggest.html"
25     submit = _('Wyślij zgłoszenie')
26     success_message = _('Zgłoszenie zostało wysłane.')
27     honeypot = True
28     action = reverse_lazy('suggest')