Commit eea3464d authored by Romain Courteaud's avatar Romain Courteaud

Use an unique request dialog.

parent 1dc12713
......@@ -55,6 +55,19 @@
if not service_title:\n
service_title = "Vifib KVM %i" % portal.portal_ids.generateNewId(id_group=("vifib", "kvm"), default=1),\n
\n
hosting_subscription = portal.portal_catalog.getResultValue(\n
portal_type=\'Hosting Subscription\',\n
validation_state="validated",\n
select_expression=\'title\',\n
title={\'query\': service_title, \'key\': \'ExactMatch\'}\n
)\n
\n
if hosting_subscription is not None:\n
return context.Base_redirect(dialog_id,\n
keep_items={\'portal_status_message\':context.Base_translateString(\n
"You already have service named ${service_title}. Please choose different unique name.", mapping={\'service_title\': service_title})})\n
\n
\n
url = context.getUrlString()\n
\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
......@@ -78,7 +91,7 @@ return context.REQUEST.get(\'request_hosting_subscription\').Base_redirect(keep_
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>service_title=None, instance_xml=None</string> </value>
<value> <string>dialog_id, service_title=None, instance_xml=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -65,8 +65,10 @@ else:\n
if kw.has_key(\'came_from\'):\n
#we override the context to redirect the user to the next web section\n
context = portal.restrictedTraverse(kw[\'came_from\'])\n
\n
context.WebSection_viewNextStep()\n
\n
software_release = portal.portal_catalog.getResultValue(uid=uids[0])\n
return software_release.Base_redirect(\'SoftwareRelease_viewRequestDialog\')\n
# context.WebSection_viewNextStep()\n
</string> </value>
</item>
<item>
......
454
\ No newline at end of file
455
\ 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