add a hook for a pre registration message
This commit is contained in:
@@ -883,6 +883,7 @@ class Auth(object):
|
|||||||
auth_manager_role=None,
|
auth_manager_role=None,
|
||||||
login_captcha=None,
|
login_captcha=None,
|
||||||
register_captcha=None,
|
register_captcha=None,
|
||||||
|
pre_registration_div=None,
|
||||||
retrieve_username_captcha=None,
|
retrieve_username_captcha=None,
|
||||||
retrieve_password_captcha=None,
|
retrieve_password_captcha=None,
|
||||||
captcha=None,
|
captcha=None,
|
||||||
@@ -2540,6 +2541,12 @@ class Auth(object):
|
|||||||
addrow(form, captcha.label, captcha,
|
addrow(form, captcha.label, captcha,
|
||||||
captcha.comment, self.settings.formstyle, 'captcha__row')
|
captcha.comment, self.settings.formstyle, 'captcha__row')
|
||||||
|
|
||||||
|
#Add a message if specified
|
||||||
|
if self.settings.pre_registration_div:
|
||||||
|
addrow(form, '',
|
||||||
|
DIV(_id="pre-reg", *self.settings.pre_registration_div),
|
||||||
|
'', formstyle, '')
|
||||||
|
|
||||||
table_user.registration_key.default = key = web2py_uuid()
|
table_user.registration_key.default = key = web2py_uuid()
|
||||||
if form.accepts(request, session if self.csrf_prevention else None,
|
if form.accepts(request, session if self.csrf_prevention else None,
|
||||||
formname='register',
|
formname='register',
|
||||||
|
|||||||
Reference in New Issue
Block a user