|
|
@ -12,7 +12,8 @@ class RegistrationSchema(CSRFSchema): |
|
|
|
|
|
|
|
|
|
|
|
user_name = colander.SchemaNode( |
|
|
|
user_name = colander.SchemaNode( |
|
|
|
colander.String(), |
|
|
|
colander.String(), |
|
|
|
widget=deform.widget.TextInputWidget(readonly=True), |
|
|
|
widget=deform.widget.TextInputWidget(disabled=True), |
|
|
|
|
|
|
|
description='automagically generated for you' |
|
|
|
) |
|
|
|
) |
|
|
|
first_name = colander.SchemaNode( |
|
|
|
first_name = colander.SchemaNode( |
|
|
|
colander.String() |
|
|
|
colander.String() |
|
|
@ -28,3 +29,13 @@ class RegistrationSchema(CSRFSchema): |
|
|
|
colander.String(), |
|
|
|
colander.String(), |
|
|
|
widget=deform.widget.CheckedPasswordWidget() |
|
|
|
widget=deform.widget.CheckedPasswordWidget() |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
|
|
|
def as_form(cls, request, **override): |
|
|
|
|
|
|
|
settings = { |
|
|
|
|
|
|
|
'buttons': ('Create Account', 'Cancel'), |
|
|
|
|
|
|
|
'css_class': 'form-horizontal' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
settings.update(override) |
|
|
|
|
|
|
|
return super().as_form(request, **settings) |
|
|
|
|
|
|
|
|
|
|
|