add a hook for a pre registration message

This commit is contained in:
Charles Law
2013-09-21 19:48:21 -04:00
parent d4bceef5b4
commit cb7753af2a
+7
View File
@@ -883,6 +883,7 @@ class Auth(object):
auth_manager_role=None,
login_captcha=None,
register_captcha=None,
pre_registration_div=None,
retrieve_username_captcha=None,
retrieve_password_captcha=None,
captcha=None,
@@ -2540,6 +2541,12 @@ class Auth(object):
addrow(form, captcha.label, captcha,
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()
if form.accepts(request, session if self.csrf_prevention else None,
formname='register',