mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
first_boot: Add separate greeting page
This commit is contained in:
1 parent
23eb40fce8
commit
f3a0c70d23
6 files changed
+122
-59
No files matched your search
@@ -28,15 +28,15 @@ from plinth.errors import ActionError
|
||||
from plinth.modules.users.forms import GROUP_CHOICES
|
||||
|
||||
|
||||
class State0Form(auth.forms.UserCreationForm):
|
||||
"""Firstboot state 0: create a new user."""
|
||||
class State1Form(auth.forms.UserCreationForm):
|
||||
"""Firstboot state 1: create a new user."""
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.request = kwargs.pop('request')
|
||||
super(State0Form, self).__init__(*args, **kwargs)
|
||||
super(State1Form, self).__init__(*args, **kwargs)
|
||||
|
||||
def save(self, commit=True):
|
||||
"""Create and log the user in."""
|
||||
user = super(State0Form, self).save(commit=commit)
|
||||
user = super(State1Form, self).save(commit=commit)
|
||||
if commit:
|
||||
try:
|
||||
actions.superuser_run(
|
||||
|
||||
Reference in new issue
Block a user