Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TIC-Desk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Teckids
TIC-Desk
Commits
dd9cafa6
Unverified
Commit
dd9cafa6
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Fix style and indentation.
parent
0132bab3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ticdesk_org/forms.py
+15
-6
15 additions, 6 deletions
ticdesk_org/forms.py
with
15 additions
and
6 deletions
ticdesk_org/forms.py
+
15
−
6
View file @
dd9cafa6
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment