Commit de061d91 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

Improve messages.

parent 1296287a
...@@ -90,7 +90,7 @@ kw.setdefault(\'reference\', kw[\'default_email_text\'])\n ...@@ -90,7 +90,7 @@ kw.setdefault(\'reference\', kw[\'default_email_text\'])\n
if \'password_confirm\' in kw:\n if \'password_confirm\' in kw:\n
del kw[\'password_confirm\']\n del kw[\'password_confirm\']\n
\n \n
#Check that user doesn\'t already exists\n # Check that user doesn\'t already exists\n
person_list = portal.acl_users.erp5_users.getUserByLogin(kw[\'reference\'])\n person_list = portal.acl_users.erp5_users.getUserByLogin(kw[\'reference\'])\n
if person_list:\n if person_list:\n
msg = translateString("This account already exists. Please provide another email address.")\n msg = translateString("This account already exists. Please provide another email address.")\n
...@@ -124,11 +124,19 @@ assignment = person.newContent(portal_type=\'Assignment\',\n ...@@ -124,11 +124,19 @@ assignment = person.newContent(portal_type=\'Assignment\',\n
site=person_site)\n site=person_site)\n
assignment.open()\n assignment.open()\n
\n \n
msg = translateString("Your account was successfully created.")\n is_shopping_cart = context.REQUEST.get(\'is_shopping_cart\')\n
if is_shopping_cart is None:\n
is_shopping_cart = context.REQUEST.get(\'field_your_is_shopping_cart\')\n
\n
if is_shopping_cart:\n
msg = translateString("Your account was successfully created, now you can proceed to payment.")\n
else:\n
msg = translateString("Your account was successfully created.")\n
\n \n
# Set owner local role for cart if needed\n # Set owner local role for cart if needed\n
shopping_cart = context.SaleOrder_getShoppingCart()\n shopping_cart = context.SaleOrder_getShoppingCart()\n
shopping_cart.manage_setLocalRoles(kw[\'reference\'], [\'Owner\'])\n if shopping_cart is not None:\n
shopping_cart.manage_setLocalRoles(kw[\'reference\'], [\'Owner\'])\n
\n \n
# Redirect if needed to coming_from_url\n # Redirect if needed to coming_from_url\n
came_from = kw[\'came_from\']\n came_from = kw[\'came_from\']\n
......
320 321
\ 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