From de2dbd352ae085b0c512086e6f85951c009b8743 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Thu, 19 Apr 2018 12:24:15 +0200 Subject: [PATCH] completet registration form --- ordr/resources/account.py | 12 +++++++++++- ordr/schemas/account.py | 11 +++++++---- ordr/static/pyramid.png | Bin 12901 -> 0 bytes ordr/static/scripts.js | 21 +++++++++++++++++++++ ordr/templates/layout.jinja2 | 1 + ordr/views/registration.py | 13 ++++++------- 6 files changed, 46 insertions(+), 12 deletions(-) delete mode 100644 ordr/static/pyramid.png create mode 100644 ordr/static/scripts.js diff --git a/ordr/resources/account.py b/ordr/resources/account.py index 8aae785..ea2bf61 100644 --- a/ordr/resources/account.py +++ b/ordr/resources/account.py @@ -1,5 +1,7 @@ ''' Resources (sub) package, used to connect URLs to views ''' +import deform + from pyramid.security import Allow, Everyone, DENY_ALL from ordr.schemas.account import RegistrationSchema @@ -23,7 +25,15 @@ class RegistrationResource(BaseChildResource): def get_registration_form(self, **kwargs): ''' returns the registration form''' settings = { - 'buttons': ('Create account', 'Cancel'), + 'buttons': ( + deform.Button(name='create', title='Create Account'), + deform.Button( + title='Cancel', + type='link', + value=self.request.resource_url(self.request.root), + css_class='btn btn-secondary' + ) + ), } settings.update(kwargs) return self._prepare_form(RegistrationSchema, **settings) diff --git a/ordr/schemas/account.py b/ordr/schemas/account.py index 7420f0f..c85004f 100644 --- a/ordr/schemas/account.py +++ b/ordr/schemas/account.py @@ -17,16 +17,19 @@ class RegistrationSchema(CSRFSchema): username = colander.SchemaNode( colander.String(), widget=deform.widget.TextInputWidget( - readonly=True, + readonly=True ), description='automagically generated for you', - validator=deferred_unique_username_validator, + validator=deferred_unique_username_validator, + oid='registration_username' ) first_name = colander.SchemaNode( - colander.String() + colander.String(), + oid='registration_first_name' ) last_name = colander.SchemaNode( - colander.String() + colander.String(), + oid='registration_last_name' ) email = colander.SchemaNode( colander.String(), diff --git a/ordr/static/pyramid.png b/ordr/static/pyramid.png deleted file mode 100644 index 4ab837be95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+j6S;F=gHKtH^yZ|^Au9_5R*O_?Qj;zem zxaZs0$F~cllF440*kOy9khe)tt|^BDNJ8Tcu{-DD>$IZ_Kc|8u4!r56T3aoqK?q06 zi?@8kkW6&x!?7cg@NoQyCY%D##F^$x2} zmJs7q`ZtUjtlKHFFz4p;aWhHjF6Um@rktsn?oI1D*-Hd!(Df5N>jAUh#W*oc<&Bi7 zHo%dei>%VPt3hk6MxNi_Es7TtGMdasl<|~f(O$o~A?FarcW*)Fe*vwclnHDZ?}+SP zgYR&kn8RYb9O9><=RQuodIuwAN)ulS;SGy)PX}i^~1UYf0k$b`JnqicQgxToaq?rolg6VA7$>(o?TbE z6jEI3BBqxbUgL{6t@896dly!z7dXPugQXkT$}T@PWqm_3(f}$Agk`G%;50L{=*mi| zTE(qgB%svciozkc)B + diff --git a/ordr/views/registration.py b/ordr/views/registration.py index f866947..77e1053 100644 --- a/ordr/views/registration.py +++ b/ordr/views/registration.py @@ -25,12 +25,11 @@ def registration_form(context, request): renderer='ordr:templates/account/registration_form.jinja2' ) def registration_form_processing(context, request): - if 'Cancel' in request.POST: - return HTTPFound(request.resource_url(request.root)) form = context.get_registration_form() - data = request.POST.items() - try: - appstruct = form.validate(data) - except deform.ValidationFailure as e: - pass + if 'create' in request.POST: + data = request.POST.items() + try: + appstruct = form.validate(data) + except deform.ValidationFailure as e: + pass return {'form': form}