mirror of
https://github.com/pretix/pretix.git
synced 2025-12-06 21:42:49 +00:00
Compare commits
4 Commits
widget-dat
...
fix-custom
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e70a903875 | ||
|
|
fa0aa71c5c | ||
|
|
032be74d77 | ||
|
|
e2e811ea47 |
@@ -3291,6 +3291,8 @@ Your {organizer} team""")) # noqa: W291
|
||||
label=_('Validity of gift card codes in years'),
|
||||
help_text=_('If you set a number here, gift cards will by default expire at the end of the year after this '
|
||||
'many years. If you keep it empty, gift cards do not have an explicit expiry date.'),
|
||||
min_value=0,
|
||||
max_value=99,
|
||||
)
|
||||
},
|
||||
'cookie_consent': {
|
||||
|
||||
@@ -257,18 +257,21 @@ class RegistrationForm(forms.Form):
|
||||
return self.cleaned_data
|
||||
|
||||
def create(self):
|
||||
customer = self.request.organizer.customers.create(
|
||||
customer, created = self.request.organizer.customers.get_or_create(
|
||||
email=self.cleaned_data['email'],
|
||||
name_parts=self.cleaned_data['name_parts'],
|
||||
phone=self.cleaned_data.get('phone'),
|
||||
is_active=True,
|
||||
is_verified=False,
|
||||
locale=get_language_without_region(),
|
||||
defaults={
|
||||
"name_parts": self.cleaned_data['name_parts'],
|
||||
"phone": self.cleaned_data.get('phone'),
|
||||
"is_active": True,
|
||||
"is_verified": False,
|
||||
"locale": get_language_without_region(),
|
||||
}
|
||||
)
|
||||
customer.set_unusable_password()
|
||||
customer.save()
|
||||
customer.log_action('pretix.customer.created', {})
|
||||
customer.send_activation_mail()
|
||||
if created:
|
||||
customer.set_unusable_password()
|
||||
customer.save()
|
||||
customer.log_action('pretix.customer.created', {})
|
||||
customer.send_activation_mail()
|
||||
return customer
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
{% block custom_header %}
|
||||
{% if event.settings.meta_noindex %}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{% elif "date" in request.GET or "old" in request.GET %}
|
||||
<meta name="robots" content="noindex, follow">
|
||||
{% endif %}
|
||||
<meta property="og:type" content="website" />
|
||||
{% if social_image %}
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
{% block custom_header %}
|
||||
{% if organizer.settings.meta_noindex %}
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
{% elif "date" in request.GET or "old" in request.GET %}
|
||||
<meta name="robots" content="noindex, follow">
|
||||
{% endif %}
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user