Commit 4a64f64f authored by Romain Courteaud's avatar Romain Courteaud

Use selection to store user choices

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42521 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40248154
...@@ -58,7 +58,9 @@ if len(uids) != 1:\n ...@@ -58,7 +58,9 @@ if len(uids) != 1:\n
keep_items={\'portal_status_message\':context.Base_translateString("Please select one service.")})\n keep_items={\'portal_status_message\':context.Base_translateString("Please select one service.")})\n
else:\n else:\n
session = context.WebSection_getVifibSession()\n session = context.WebSection_getVifibSession()\n
session[\'instance_software_product_uid\'] = uids[0]\n params = portal.portal_selections.getSelectionParamsFor(\'vifib_session_id\')\n
params["instance_software_product_uid"] = uids[0]\n
portal.portal_selections.setSelectionParamsFor(\'vifib_session_id\', params)\n
\n \n
if kw.has_key(\'came_from\'):\n if kw.has_key(\'came_from\'):\n
#we override the context to redirect the user to the next web section\n #we override the context to redirect the user to the next web section\n
...@@ -111,6 +113,7 @@ context.WebSection_viewNextStep()\n ...@@ -111,6 +113,7 @@ context.WebSection_viewNextStep()\n
<string>portal</string> <string>portal</string>
<string>len</string> <string>len</string>
<string>session</string> <string>session</string>
<string>params</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_write_</string> <string>_write_</string>
</tuple> </tuple>
......
...@@ -58,7 +58,9 @@ if len(uids) != 1:\n ...@@ -58,7 +58,9 @@ if len(uids) != 1:\n
keep_items={\'portal_status_message\':context.Base_translateString("Please select one software release.")})\n keep_items={\'portal_status_message\':context.Base_translateString("Please select one software release.")})\n
else:\n else:\n
session = context.WebSection_getVifibSession()\n session = context.WebSection_getVifibSession()\n
session[\'instance_software_release_uid\'] = uids[0]\n params = portal.portal_selections.getSelectionParamsFor(\'vifib_session_id\')\n
params["instance_software_release_uid"] = uids[0]\n
portal.portal_selections.setSelectionParamsFor(\'vifib_session_id\', params)\n
\n \n
if kw.has_key(\'came_from\'):\n if kw.has_key(\'came_from\'):\n
#we override the context to redirect the user to the next web section\n #we override the context to redirect the user to the next web section\n
...@@ -110,6 +112,7 @@ context.WebSection_viewNextStep()\n ...@@ -110,6 +112,7 @@ context.WebSection_viewNextStep()\n
<string>portal</string> <string>portal</string>
<string>len</string> <string>len</string>
<string>session</string> <string>session</string>
<string>params</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_write_</string> <string>_write_</string>
</tuple> </tuple>
......
...@@ -69,7 +69,9 @@ person.edit(\n ...@@ -69,7 +69,9 @@ person.edit(\n
\n \n
# return context.WebSection_viewNextStep()\n # return context.WebSection_viewNextStep()\n
session = context.WebSection_getVifibSession()\n session = context.WebSection_getVifibSession()\n
instance_software_release_uid = session[\'instance_software_release_uid\']\n params = portal.portal_selections.getSelectionParamsFor(\'vifib_session_id\')\n
instance_software_release_uid = params[\'instance_software_release_uid\']\n
\n
software_release = portal.portal_catalog.getResultValue(uid=instance_software_release_uid)\n software_release = portal.portal_catalog.getResultValue(uid=instance_software_release_uid)\n
\n \n
person.requestSoftwareInstance(\n person.requestSoftwareInstance(\n
...@@ -135,6 +137,7 @@ return context.getWebSiteValue().Base_redirect(keep_items={\'portal_status_messa ...@@ -135,6 +137,7 @@ return context.getWebSiteValue().Base_redirect(keep_items={\'portal_status_messa
<string>portal</string> <string>portal</string>
<string>person</string> <string>person</string>
<string>session</string> <string>session</string>
<string>params</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>instance_software_release_uid</string> <string>instance_software_release_uid</string>
<string>software_release</string> <string>software_release</string>
......
268 269
\ 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