|
@@ -68,7 +68,6 @@ class textSearchForm(forms.Form):
|
|
|
|
|
|
|
|
class searchAgentForm(forms.ModelForm):
|
|
class searchAgentForm(forms.ModelForm):
|
|
|
|
|
|
|
|
-
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
|
model = SearchAgent
|
|
model = SearchAgent
|
|
|
fields = ('ort', 'email')
|
|
fields = ('ort', 'email')
|
|
@@ -76,15 +75,28 @@ class searchAgentForm(forms.ModelForm):
|
|
|
agent_layout = Layout(
|
|
agent_layout = Layout(
|
|
|
Fieldset(
|
|
Fieldset(
|
|
|
('Suchagent'),
|
|
('Suchagent'),
|
|
|
- 'ort',
|
|
|
|
|
|
|
+ # 'ort',
|
|
|
|
|
+ Div(
|
|
|
|
|
+ Div('ort', css_class='col-sm-6 col-6 checkbox-ort'),
|
|
|
|
|
+ Div(
|
|
|
|
|
+ HTML("""
|
|
|
|
|
+ <button onclick=" ganz_wien()" class="btn btn-primary border-thin border-dark mybtn">Ganz Wien</button>
|
|
|
|
|
+ <script>
|
|
|
|
|
+ function ganz_wien(){
|
|
|
|
|
+ $(".checkbox-ort .custom-control-label:contains('Wien')").each(function() {
|
|
|
|
|
+ $this = $(this);
|
|
|
|
|
+ var selector = "#" + $this.attr('for') ;
|
|
|
|
|
+ $( selector ).prop('checked', true);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
|
|
+ """),
|
|
|
|
|
+ css_class='col-sm-6 col-6'),
|
|
|
|
|
+ css_class='form-row row'),
|
|
|
|
|
+
|
|
|
),
|
|
),
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- # def __init__(self, *args, **kwargs):
|
|
|
|
|
- # super().__init__(*args, **kwargs)
|
|
|
|
|
- # self.fields ['ort'].label = 'Ich akzeptiere die <a href="{}"> Datenschutzrichtlinie</a> sowie die <a href="{}"> Teilnahmebedingungen</a> und habe sie gelesen.'.format(drurl, tmurl)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
class AgentNewslwtterForm( searchAgentForm, GeneralFields):
|
|
class AgentNewslwtterForm( searchAgentForm, GeneralFields):
|
|
|
|
|
|
|
|
email_field = forms.EmailField( label = 'Email', required=True, max_length=254 )
|
|
email_field = forms.EmailField( label = 'Email', required=True, max_length=254 )
|
|
@@ -95,7 +107,7 @@ class AgentNewslwtterForm( searchAgentForm, GeneralFields):
|
|
|
super(searchAgentForm, self).__init__(*args, **kwargs)
|
|
super(searchAgentForm, self).__init__(*args, **kwargs)
|
|
|
self.helper = FormHelper(self)
|
|
self.helper = FormHelper(self)
|
|
|
self.helper.attrs = { 'enctype' : "multipart/form-data" }
|
|
self.helper.attrs = { 'enctype' : "multipart/form-data" }
|
|
|
- self.helper.form_action = reverse('agent-newsletter-create', kwargs={'newsletter_slug': "test_news"} )
|
|
|
|
|
|
|
+ self.helper.form_action = reverse('agent-newsletter-create', kwargs={'newsletter_slug': "gemeinschaffen-newsletter"} )
|
|
|
|
|
|
|
|
self.helper.layout = Layout(
|
|
self.helper.layout = Layout(
|
|
|
self.agent_layout,
|
|
self.agent_layout,
|
|
@@ -109,7 +121,6 @@ class AgentNewslwtterForm( searchAgentForm, GeneralFields):
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
class RegisterForm(forms.ModelForm, GeneralFields):
|
|
class RegisterForm(forms.ModelForm, GeneralFields):
|
|
|
|
|
|
|
|
class Meta:
|
|
class Meta:
|
|
@@ -187,7 +198,7 @@ class WohnprojektForm(ProductForm):
|
|
|
class Meta:
|
|
class Meta:
|
|
|
model = Wohnprojekt
|
|
model = Wohnprojekt
|
|
|
fields = ProductForm.product_fields + (
|
|
fields = ProductForm.product_fields + (
|
|
|
- 'eigentum', 'inseratstext', 'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger', 'aerwachsene', 'akinder', 'awohnungen', 'wohnflaeche', 'gewerbeflaechen', 'gemeinschaftsflaeche', 'sonstige_flaechen', 'kflaechen', 'gemeinschaftr', 'kgemeinschaftr', 'sonderwohnformen', 'raumangebot', 'kraumangebot', 'parbeiten', 'karbeiten', 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'gaestwohnungen',
|
|
|
|
|
|
|
+ 'eigentum', 'inseratstext', 'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger', 'aerwachsene', 'akinder', 'awohnungen', 'wohnflaeche', 'gewerbeflaechen', 'gemeinschaftsflaeche', 'sonstige_flaechen', 'kflaechen', 'gemeinschaftr', 'kgemeinschaftr', 'sonderwohnformen', 'raumangebot', 'kraumangebot', 'parbeiten', 'karbeiten', 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'gaestwohnungen', 'urbanem',
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
def __init__(self,*args, **kwargs):
|
|
def __init__(self,*args, **kwargs):
|
|
@@ -250,7 +261,7 @@ class WohnprojektForm(ProductForm):
|
|
|
Div('karbeiten', css_class='col-sm-6 col-6'),
|
|
Div('karbeiten', css_class='col-sm-6 col-6'),
|
|
|
css_class='form-row row'),
|
|
css_class='form-row row'),
|
|
|
|
|
|
|
|
- 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote',
|
|
|
|
|
|
|
+ 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'urbanem',
|
|
|
|
|
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|