Commit 803c9cbf authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Display a default dialog message if none received from server

parent b6b517ee
...@@ -373,13 +373,16 @@ and handling data send&receive. ...@@ -373,13 +373,16 @@ and handling data send&receive.
// successful form save returns simple redirect and an answer as JSON // successful form save returns simple redirect and an answer as JSON
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return jIO.util.readBlobAsText(attachment.target.response); return RSVP.all([
jIO.util.readBlobAsText(attachment.target.response),
gadget.translate('Action succeeded.')
]);
}) })
.push(function (response_text) { .push(function (result_list) {
var response = JSON.parse(response_text.target.result); var response = JSON.parse(result_list[0].target.result);
return gadget.notifySubmitted({ return gadget.notifySubmitted({
"message": response.portal_status_message, "message": response.portal_status_message || result_list[1],
"status": response.portal_status_level || "success" "status": response.portal_status_level || "success"
}); });
}) })
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>978.15561.54943.25565</string> </value> <value> <string>978.43862.35468.53555</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1567699957.33</float> <float>1569398056.45</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