Skip to content
Snippets Groups Projects
Unverified Commit dd9cafa6 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix style and indentation.

parent 0132bab3
No related branches found
No related tags found
No related merge requests found
......@@ -8,20 +8,24 @@ import phonenumbers
TeckidsProject = apps.get_model('ticdesk_events', 'TeckidsProject')
def is_phonenumber(number):
try:
phonenumbers.parse(number, 'DE')
except BaseException:
raise forms.ValidationError(_('%s ist keine gültige Telefonnummer!') % number)
raise forms.ValidationError(
_('%s ist keine gültige Telefonnummer!') % number)
class AddGuardianForm(forms.Form):
given_name = forms.CharField(label=_('Vorname'), max_length=100)
sn = forms.CharField(label=_('Nachname'), max_length=100)
mail = forms.EmailField(label=_('E-Mail-Adresse'))
mobile = forms.CharField(label=_('Handynummer'), validators=[is_phonenumber], required=False)
mobile = forms.CharField(label=_('Handynummer'), validators=[
is_phonenumber], required=False)
street = forms.CharField(label=_('Straße und Hausnummer'), required=False)
postal_code = forms.CharField(label=_('Postleitzahl (PLZ)'), required=False)
postal_code = forms.CharField(
label=_('Postleitzahl (PLZ)'), required=False)
place = forms.CharField(label=_('Ort'), required=False)
......@@ -46,14 +50,17 @@ SENDER_CHOICES = [
class GroupContactForm(forms.Form):
service = forms.ChoiceField(label=_('Versandart'), choices=SERVICE_CHOICES)
sender = forms.ChoiceField(label=_('Absender'), choices=SENDER_CHOICES)
recipients = forms.MultipleChoiceField(label=_('Empfänger'), choices=RECIPIENT_CHOICES)
recipients = forms.MultipleChoiceField(
label=_('Empfänger'), choices=RECIPIENT_CHOICES)
subject = forms.CharField(label=_('Betreff'))
text = forms.CharField(label=_('Text'), widget=forms.Textarea)
class VoucherCreationForm(forms.Form):
project_cn = forms.ChoiceField(
label=_('Name der Veranstaltung'),
help_text=_('Wähle die Veranstaltung aus, für die du einen Voucher erstellen möchtest.'),
help_text=_(
'Wähle die Veranstaltung aus, für die du einen Voucher erstellen möchtest.'),
choices=[(group.cn, group.display_name) for group in TeckidsProject.objects.filter(date_event__gte=datetime.today().replace(tzinfo=pytz.UTC))])
person_uid = forms.CharField(
......@@ -65,6 +72,7 @@ class VoucherCreationForm(forms.Form):
label=_('Rabatt'),
help_text=_('Rabattwert welchen die Person erhalten soll. Maximal 100.'))
class EditUserForm(forms.Form):
# Directly editable for everyone
mail = forms.CharField(
......@@ -129,11 +137,12 @@ class EditUserForm(forms.Form):
label=_('Geburtstags-E-Mails'),
help_text=_('Gib hier ein, wie viele Tage im Voraus du wissen möchtest, wann wer Geburtstag hat. Zum Beispiel 5.'))
# Not editable, but generate mail to OTRS on change
# Not editable, but generate mail to OTRS on change
street = forms.CharField(label=_('Straße und Hausnummer'))
postal_code = forms.CharField(label=_('Postleitzahl (PLZ)'))
place = forms.CharField(label=_('Ort'))
class EditVoucherForm(forms.Form):
code = forms.CharField(
required=False,
......
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