Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Paweljong
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
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
Show more breadcrumbs
Teckids
Projekt Hack-n-Fun
AlekSIS-App-Paweljong
Commits
b1ce678e
Verified
Commit
b1ce678e
authored
2 months ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
feat: Duplicate form for account registration
parent
b645f6c3
No related branches found
No related tags found
1 merge request
!75
feat: Duplicate form for account registration
Pipeline
#194794
failed
2 months ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/paweljong/forms.py
+32
-0
32 additions, 0 deletions
aleksis/apps/paweljong/forms.py
aleksis/apps/paweljong/urls.py
+2
-1
2 additions, 1 deletion
aleksis/apps/paweljong/urls.py
with
34 additions
and
1 deletion
aleksis/apps/paweljong/forms.py
+
32
−
0
View file @
b1ce678e
...
...
@@ -600,3 +600,35 @@ class EventCheckpointForm(forms.Form):
decimal_places
=
8
,
widget
=
forms
.
HiddenInput
(),
)
class
RegisterAccountForm
(
SignupForm
,
ExtensibleForm
):
"""
Form to register new user accounts.
"""
class
Meta
:
model
=
EventRegistration
fields
=
[]
layout
=
Layout
(
Fieldset
(
_
(
"
Base data
"
),
Row
(
"
first_name
"
,
"
last_name
"
,
"
date_of_birth
"
),
),
Fieldset
(
_
(
"
Account data
"
),
"
username
"
,
Row
(
"
email
"
,
"
email2
"
),
Row
(
"
password1
"
,
"
password2
"
),
),
)
first_name
=
forms
.
CharField
(
label
=
_
(
"
First name
"
))
last_name
=
forms
.
CharField
(
label
=
_
(
"
Last name
"
))
date_of_birth
=
forms
.
DateField
(
label
=
_
(
"
Date of birth
"
))
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
"
username
"
].
help_text
=
_
(
"
The username must only contain lower case letters and numbers,
"
"
and must begin with a letter.
"
)
This diff is collapsed.
Click to expand it.
aleksis/apps/paweljong/urls.py
+
2
−
1
View file @
b1ce678e
...
...
@@ -4,6 +4,7 @@ from aleksis.apps.postbuero.forms import MailAddForm
from
.
import
views
from
.forms
import
(
RegisterAccountForm
,
RegisterEventAccount
,
RegisterEventAdditional
,
RegisterEventConsent
,
...
...
@@ -29,7 +30,7 @@ condition_dict = {
account_forms
=
[
(
"
email
"
,
MailAddForm
),
(
"
register
"
,
Register
Event
Account
),
(
"
register
"
,
RegisterAccount
Form
),
]
account_conditions
=
{
...
...
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