Commit e3a35127 authored by Kristian Rother's avatar Kristian Rother

2007-02-26 kr

* Better messages for the registration widget

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13061 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9f6611ec
...@@ -94,12 +94,12 @@ for f in fields:\n ...@@ -94,12 +94,12 @@ for f in fields:\n
returned_params = \'&\'.join([f+\'=\'+kwargs[f] for f in kwargs])\n returned_params = \'&\'.join([f+\'=\'+kwargs[f] for f in kwargs])\n
context.log(returned_params)\n context.log(returned_params)\n
if missing_string:\n if missing_string:\n
params = returned_params + \'&\' + missing_string + \'&portal_status_message=You did not fill all the required fields\'\n params = returned_params + \'&\' + missing_string + \'&portal_status_message=You did not fill all the required fields. See below to find out which fields still have to be filled.\'\n
context.log(params)\n context.log(params)\n
return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n
if req.get(\'your_email\') != req.get(\'your_email_repeated\'):\n if req.get(\'your_email\') != req.get(\'your_email_repeated\'):\n
missing_string += \'&missing:list=email&missing:list=email_repeated\'\n missing_string += \'&missing:list=email&missing:list=email_repeated\'\n
params = returned_params + \'&\' + missing_string + \'&portal_status_message=You entered two different email addresses\'\n params = returned_params + \'&\' + missing_string + \'&portal_status_message=You entered two different email addresses. Please make sure to enter the same email adress in the fields Email Adress and Repeat Email Adress.\'\n
return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n
\n \n
# create a user\n # create a user\n
...@@ -107,7 +107,7 @@ context.log(kwargs)\n ...@@ -107,7 +107,7 @@ context.log(kwargs)\n
try:\n try:\n
user = context.WebSite_createUser(**kwargs)\n user = context.WebSite_createUser(**kwargs)\n
context.log(user)\n context.log(user)\n
msg = \'Thank you for registering. Your password will be sent to the email adress that you provided.\'\n msg = \'Thank you for registering. Your password will be sent to the email adress that you provided once your account has been validated by the appropriate department.\'\n
except Exception, e:\n except Exception, e:\n
msg = str(e)\n msg = str(e)\n
\n \n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment