Commit bdc46a2d authored by Łukasz Nowak's avatar Łukasz Nowak

Allow to edit parameter XML.

While requesting Software Instance allow to edit instance XML, leave current
default in user interface.

While navigating to Software Instance make text_content editable and allow to
edit the form.
parent b4b9fa20
......@@ -217,7 +217,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>width</string> </key>
......
......@@ -12,7 +12,6 @@
<list>
<string>css_class</string>
<string>default</string>
<string>enabled</string>
<string>name</string>
<string>title</string>
</list>
......@@ -83,10 +82,6 @@
<key> <string>default</string> </key>
<value> <string>Update</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_input_button_field</string> </value>
......
......@@ -78,6 +78,7 @@ session = context.WebSection_getVifibSession()\n
params = portal.portal_selections.getSelectionParamsFor(\'vifib_session_id\')\n
params["instance_software_product_uid"] = uids[0]\n
params["service_title"] = service_title\n
params["instance_xml"] = instance_xml\n
portal.portal_selections.setSelectionParamsFor(\'vifib_session_id\', params)\n
\n
if kw.has_key(\'came_from\'):\n
......@@ -91,7 +92,7 @@ context.WebSection_viewNextStep()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>dialog_id, service_title, uids=[], quantity = 1, reset_shopping_cart=True, **kw</string> </value>
<value> <string>dialog_id, service_title, instance_xml, uids=[], quantity = 1, reset_shopping_cart=True, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -50,9 +50,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""Update customer informations"""\n
<value> <string>"""Update customer informations"""\n
portal = context.getPortalObject()\n
\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
......@@ -72,24 +70,18 @@ session = context.WebSection_getVifibSession()\n
params = portal.portal_selections.getSelectionParamsFor(\'vifib_session_id\')\n
instance_software_release_uid = params[\'instance_software_release_uid\']\n
service_title = params[\'service_title\']\n
instance_xml = params[\'instance_xml\']\n
software_release = portal.portal_catalog.getResultValue(uid=instance_software_release_uid)\n
\n
person.requestSoftwareInstance(\n
software_release=software_release.getUrlString(),\n
software_title=service_title,\n
instance_xml="""<?xml version="1.0" encoding="utf-8"?>\n
<instance>\n
<parameter id="nbd_ip">2a01:e35:2e27:460:e2cb:4eff:fed9:48dc</parameter>\n
<parameter id="nbd_port">1024</parameter>\n
</instance>\n
""",\n
instance_xml=instance_xml,\n
)\n
\n
message = context.Base_translateString("Your instance is under creation. Thank you for using ViFiB!")\n
return context.getWebSiteValue().Base_redirect(keep_items={\'portal_status_message\': message})\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
......@@ -100,6 +100,7 @@
<list>
<string>my_description</string>
<string>your_service_title</string>
<string>your_instance_xml</string>
</list>
</value>
</item>
......
286
\ No newline at end of file
287
\ 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