diff --git a/ordr2/schemas/account.py b/ordr2/schemas/account.py index ab0f812..2fe4ece 100644 --- a/ordr2/schemas/account.py +++ b/ordr2/schemas/account.py @@ -12,7 +12,8 @@ class RegistrationSchema(CSRFSchema): user_name = colander.SchemaNode( colander.String(), - widget=deform.widget.TextInputWidget(readonly=True), + widget=deform.widget.TextInputWidget(disabled=True), + description='automagically generated for you' ) first_name = colander.SchemaNode( colander.String() @@ -28,3 +29,13 @@ class RegistrationSchema(CSRFSchema): colander.String(), 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) +