|
|
@@ -18,6 +18,7 @@ from crispy_forms.helper import FormHelper
|
|
|
from captcha.fields import CaptchaField
|
|
|
from tinymce.widgets import TinyMCE
|
|
|
from newsletter.forms import *
|
|
|
+from newsletter.models import *
|
|
|
|
|
|
from marktplatz.widgets import *
|
|
|
from .models import *
|
|
|
@@ -221,6 +222,37 @@ class AgentNewslwtterForm( searchAgentForm, GeneralFields):
|
|
|
)
|
|
|
|
|
|
|
|
|
+class NewsletterForm(SubscribeRequestForm, GeneralFields):
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ model = SubscribeRequestForm.Meta.model
|
|
|
+ fields = SubscribeRequestForm.Meta.fields + (
|
|
|
+ 'terms', )
|
|
|
+
|
|
|
+ def __init__(self,*args, **kwargs):
|
|
|
+ super(SubscribeRequestForm, self).__init__(*args, **kwargs)
|
|
|
+
|
|
|
+
|
|
|
+ self.helper = FormHelper()
|
|
|
+ self.helper.form_tag = False
|
|
|
+
|
|
|
+ self.layout = Layout(
|
|
|
+ Fieldset(
|
|
|
+ ('Anmelden'),
|
|
|
+ 'name_field',
|
|
|
+ 'email_field',
|
|
|
+ 'terms',
|
|
|
+ Div(
|
|
|
+ ButtonHolder(
|
|
|
+ Submit('submit', 'Anmelden', css_class='border-thin mybtn')
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ Div(HTML(" ") ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ self.helper.layout = self.layout
|
|
|
+
|
|
|
+
|
|
|
class RegisterForm(forms.ModelForm, GeneralFields):
|
|
|
|
|
|
class Meta:
|