mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Added bootstrap, & jquery-ui. User cp now asyncronous
This commit is contained in:
@@ -22,10 +22,37 @@ class CustomUserLoginForm(AuthenticationForm):
|
||||
|
||||
|
||||
class SignUpForm(CustomUserCreationForm):
|
||||
username = forms.CharField(max_length=30, required=False, help_text='Required.')
|
||||
email = forms.EmailField(max_length=254, help_text='Not yet required, as I\'m still deciding how to handle mail')
|
||||
matrixid = forms.CharField(max_length=30, required=False, help_text='Optional.')
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CustomUserCreationForm, self).__init__(*args, **kwargs)
|
||||
for fieldname in ['password1']:
|
||||
self.fields[fieldname].help_text = 'At least 8 chars.'
|
||||
self.fields[fieldname].initial = 'Password'
|
||||
for fieldname in ['password2']:
|
||||
self.fields[fieldname].help_text = ''
|
||||
self.fields[fieldname].initial = 'Confirm Pass'
|
||||
|
||||
username = forms.CharField(
|
||||
max_length=30,
|
||||
required=True,
|
||||
help_text='Required',
|
||||
initial="",
|
||||
label="Username",
|
||||
|
||||
)
|
||||
email = forms.EmailField(
|
||||
max_length=254,
|
||||
help_text='Required',
|
||||
initial="",
|
||||
label="Email"
|
||||
)
|
||||
matrixid = forms.CharField(
|
||||
max_length=30,
|
||||
required=False,
|
||||
help_text='Optional',
|
||||
initial="",
|
||||
label="Matrix Id"
|
||||
)
|
||||
password1 = forms.PasswordInput()
|
||||
class Meta:
|
||||
model = User
|
||||
fields = ("username", "email", "matrixid")
|
||||
|
||||
Reference in New Issue
Block a user