Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos.core
Commits
56525359
Commit
56525359
authored
May 25, 2012
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checking Hosting Subscription is enough
parent
206c02df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
+8
-20
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_addSelectedSoftwareProductToShoppingCart.xml
...g/WebSection_addSelectedSoftwareProductToShoppingCart.xml
+7
-19
master/bt5/vifib_web/bt/revision
master/bt5/vifib_web/bt/revision
+1
-1
No files found.
master/bt5/vifib_web/SkinTemplateItem/portal_skins/vifib_hosting/WebSection_addSelectedSoftwareProductToShoppingCart.xml
View file @
56525359
...
...
@@ -50,9 +50,7 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
"""Add selected product to the cart and continue"""\n
<value>
<string>
"""Add selected product to the cart and continue"""\n
portal = context.getPortalObject()\n
\n
if len(uids) != 1:\n
...
...
@@ -65,22 +63,14 @@ if not service_title:\n
\n
cleanup_resource = portal.portal_preferences.getPreferredInstanceCleanupResource()\n
software_instance_list = []\n
for software_instance in context.portal_catalog(\n
portal_type=[\'Software Instance\', \'Slave Instance\'],\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
try:\n
cleanup_delivery_line = software_instance.Item_getInstancePackingListLine(cleanup_resource)\n
except ValueError:\n
software_instance_list.append(software_instance)\n
break\n
else:\n
if cleanup_delivery_line.getSimulationState() != \'delivered\':\n
software_instance_list.append(software_instance)\n
break\n
)\n
\n
if
len(software_instance_list) >
0
:\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
...
...
@@ -99,9 +89,7 @@ if kw.has_key(\'came_from\'):\n
context = portal.restrictedTraverse(kw[\'came_from\'])\n
\n
context.WebSection_viewNextStep()\n
]]>
</string>
</value>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
...
...
master/bt5/vifib_web/bt/revision
View file @
56525359
376
\ No newline at end of file
377
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment