Commit f4dcb8a2 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Indicate which instance is going to be destroyed on the form.

parent 476cbf81
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect") .declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_post", "jio_post") .declareAcquiredMethod("jio_post", "jio_post")
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment") .declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting") .declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted') .declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
...@@ -58,13 +59,26 @@ ...@@ -58,13 +59,26 @@
return RSVP.Queue() return RSVP.Queue()
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget('form_view') gadget.getDeclaredGadget('form_view'),
gadget.jio_get(options.jio_key)
]); ]);
}) })
.push(function (result) { .push(function (result) {
options.doc = result[1];
return result[0].render({ return result[0].render({
erp5_document: { erp5_document: {
"_embedded": {"_view": { "_embedded": {"_view": {
"my_title": {
"description": "",
"title": "Instance to be removed: ",
"default": options.doc.title,
"css_class": "",
"required": 1,
"editable": 0,
"key": "title_label",
"hidden": 0,
"type": "StringField"
},
"my_relative_url": { "my_relative_url": {
"description": "", "description": "",
"title": "Parent Relative Url", "title": "Parent Relative Url",
...@@ -88,13 +102,16 @@ ...@@ -88,13 +102,16 @@
group_list: [[ group_list: [[
"left", "left",
[["my_relative_url"]] [["my_relative_url"]]
], [
"center",
[["my_title"]]
]] ]]
} }
}); });
}) })
.push(function () { .push(function () {
return gadget.updateHeader({ return gadget.updateHeader({
page_title: "Destroy Hosting Subscription", page_title: "Destroy Hosting Subscription: " + options.doc.title,
submit_action: true submit_action: true
}); });
}); });
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.23589.23594.39577</string> </value> <value> <string>965.64411.29832.14557</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1518100182.5</float> <float>1520290370.68</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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