Commit 48cfd8bd authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Add short title/description on Hosting Subscription view.

parent db424f23
...@@ -172,6 +172,28 @@ ...@@ -172,6 +172,28 @@
"hidden": 0, "hidden": 0,
"type": "StringField" "type": "StringField"
}, },
"my_short_title": {
"description": "",
"title": "Short Title",
"default": gadget.state.doc.short_title,
"css_class": "",
"required": 1,
"editable": 1,
"key": "short_title",
"hidden": 0,
"type": "StringField"
},
"my_description": {
"description": "",
"title": "Description",
"default": gadget.state.doc.description,
"css_class": "",
"required": 1,
"editable": 1,
"key": "description",
"hidden": 0,
"type": "TextAreaField"
},
"my_reference": { "my_reference": {
"description": "", "description": "",
"title": "Reference", "title": "Reference",
...@@ -316,13 +338,14 @@ ...@@ -316,13 +338,14 @@
form_definition: { form_definition: {
group_list: [[ group_list: [[
"left", "left",
[["my_title"], ["my_reference"], ['my_monitoring_status']] [["my_title"], ["my_reference"],["my_short_title"], ["my_description"]]
], [ ], [
"right", "right",
[["my_slap_state_title"], ["my_source_reference"]] [["my_slap_state_title"], ['my_monitoring_status']]
], ["center", ], ["center",
[["my_url_string"], ["my_text_content"]] [["my_source_reference"], ["my_url_string"], ["my_text_content"]]
], [ ], [
"bottom", "bottom",
[["connection_listbox"], ["listbox"], ["ticket_listbox"]] [["connection_listbox"], ["listbox"], ["ticket_listbox"]]
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.40909.53540.32853</string> </value> <value> <string>965.44227.32901.2286</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519139506.49</float> <float>1519338633.06</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
request = context.REQUEST request = context.REQUEST
edit_kw = {}
if short_title != context.getShortTitle():
edit_kw["short_title"] = short_title
if description != context.getDescription():
edit_kw["description"] = description
if edit_kw.keys():
context.edit(**edit_kw)
def isSoftwareTypeChanged(software_type): def isSoftwareTypeChanged(software_type):
base_type = ['RootSoftwareInstance', 'default'] base_type = ['RootSoftwareInstance', 'default']
current_software_type = context.getSourceReference() current_software_type = context.getSourceReference()
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>text_content</string> </value> <value> <string>text_content, short_title, description</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -101,6 +101,8 @@ ...@@ -101,6 +101,8 @@
<string>my_slap_state</string> <string>my_slap_state</string>
<string>my_slap_state_title</string> <string>my_slap_state_title</string>
<string>my_news</string> <string>my_news</string>
<string>my_short_title</string>
<string>my_description</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_short_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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