Commit be0d6ecb authored by Bartek Górny's avatar Bartek Górny

Return parameters entered in registration so that they can be put into fields...

Return parameters entered in registration so that they can be put into fields in registration dialog.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13055 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1e0d579
...@@ -91,12 +91,15 @@ for f in fields:\n ...@@ -91,12 +91,15 @@ for f in fields:\n
missing_string += \'&missing:list=\' + f\n missing_string += \'&missing:list=\' + f\n
else:\n else:\n
kwargs[f] = value\n kwargs[f] = value\n
returned_params = \'&\'.join([f+\'=\'+kwargs[f] for f in kwargs])\n
context.log(returned_params)\n
if missing_string:\n if missing_string:\n
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\'\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 = 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\'\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
...@@ -165,6 +168,10 @@ return req.RESPONSE.redirect(context.absolute_url()+\'?portal_status_message=\'+ ...@@ -165,6 +168,10 @@ return req.RESPONSE.redirect(context.absolute_url()+\'?portal_status_message=\'+
<string>f</string> <string>f</string>
<string>value</string> <string>value</string>
<string>_write_</string> <string>_write_</string>
<string>append</string>
<string>$append0</string>
<string>_getitem_</string>
<string>returned_params</string>
<string>params</string> <string>params</string>
<string>_apply_</string> <string>_apply_</string>
<string>user</string> <string>user</string>
......
526 527
\ No newline at end of file \ No newline at end of file
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