Skip to content
Snippets Groups Projects
Commit 09bfbe56 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

run hooks

parent 2da70355
No related branches found
No related tags found
2 merge requests!1287Release,!1286Relase
Pipeline #20859 passed
......@@ -4,15 +4,17 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0134_uniwebhomepage_fbevents_id'),
("uniweb", "0134_uniwebhomepage_fbevents_id"),
]
operations = [
migrations.AddField(
model_name='uniwebformpage',
name='subscribe_to_ecomail',
field=models.BooleanField(default=False, verbose_name='Automaticky odebírat vyplněné údaje do Ecomail NL?'),
model_name="uniwebformpage",
name="subscribe_to_ecomail",
field=models.BooleanField(
default=False,
verbose_name="Automaticky odebírat vyplněné údaje do Ecomail NL?",
),
),
]
......@@ -4,20 +4,23 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0135_uniwebformpage_subscribe_to_ecomail'),
("uniweb", "0135_uniwebformpage_subscribe_to_ecomail"),
]
operations = [
migrations.AddField(
model_name='uniwebformpage',
name='email_field_id',
field=models.CharField(blank=True, null=True, verbose_name='ID email fieldu'),
model_name="uniwebformpage",
name="email_field_id",
field=models.CharField(
blank=True, null=True, verbose_name="ID email fieldu"
),
),
migrations.AddField(
model_name='uniwebformpage',
name='name_and_surname_field_id',
field=models.CharField(blank=True, null=True, verbose_name='ID jméno & příjmení fieldu'),
model_name="uniwebformpage",
name="name_and_surname_field_id",
field=models.CharField(
blank=True, null=True, verbose_name="ID jméno & příjmení fieldu"
),
),
]
......@@ -4,15 +4,16 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0136_uniwebformpage_email_field_id_and_more'),
("uniweb", "0136_uniwebformpage_email_field_id_and_more"),
]
operations = [
migrations.AddField(
model_name='uniwebformpage',
name='submission_button_text',
field=models.CharField(default='Odeslat', verbose_name='Text tlačítka pro odeslání formuláře'),
model_name="uniwebformpage",
name="submission_button_text",
field=models.CharField(
default="Odeslat", verbose_name="Text tlačítka pro odeslání formuláře"
),
),
]
......@@ -29,7 +29,6 @@ from shared.blocks import (
NewsletterSubscriptionBlock,
)
from shared.const import RICH_TEXT_DEFAULT_FEATURES
from shared.utils import subscribe_to_ecomail_newsletter
from shared.models import (
CalendarMixin,
CustomLogoMixin,
......@@ -50,6 +49,7 @@ from shared.models import (
SocialMixin,
SubpageMixin,
)
from shared.utils import subscribe_to_ecomail_newsletter
from shared_legacy.models import FooterMixin as LegacyFooterMixin
from shared_legacy.utils import make_promote_panels
......@@ -503,15 +503,11 @@ class UniwebFormPage(
)
name_and_surname_field_id = models.CharField(
verbose_name="ID jméno & příjmení fieldu",
blank=True,
null=True
verbose_name="ID jméno & příjmení fieldu", blank=True, null=True
)
email_field_id = models.CharField(
verbose_name="ID email fieldu",
blank=True,
null=True
verbose_name="ID email fieldu", blank=True, null=True
)
submission_button_text = models.CharField(
......@@ -575,7 +571,8 @@ class UniwebFormPage(
cleaned_data = form.cleaned_data
if (
hasattr(self, "root_page") and self.root_page
hasattr(self, "root_page")
and self.root_page
and self.subscribe_to_ecomail
and self.name_and_surname_field_id in cleaned_data
and self.email_field_id in cleaned_data
......@@ -604,7 +601,7 @@ class UniwebFormPage(
self.root_page.ecomail_newsletter_list_tags,
self.root_page.ecomail_newsletter_list_source,
self.root_page.ecomail_newsletter_list_id,
custom_data
custom_data,
)
super().process_form_submission(form)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment