Commit 057686d0 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Update jIO 3.10.2

Should fix jio.get/put on ERP5 non editable documents
parent 4c99fff8
...@@ -8783,7 +8783,8 @@ return new Parser; ...@@ -8783,7 +8783,8 @@ return new Parser;
form_data_json = {}, form_data_json = {},
field, field,
key, key,
prefix_length; prefix_length,
result;
form_data_json.form_id = { form_data_json.form_id = {
"key": [form.form_id.key], "key": [form.form_id.key],
...@@ -8811,11 +8812,15 @@ return new Parser; ...@@ -8811,11 +8812,15 @@ return new Parser;
} }
} }
return { result = {
action_href: form._actions.put.href,
data: converted_json, data: converted_json,
form_data: form_data_json form_data: form_data_json
}; };
if (form.hasOwnProperty('_actions') &&
form._actions.hasOwnProperty('put')) {
result.action_href = form._actions.put.href;
}
return result;
}); });
} }
...@@ -8973,6 +8978,12 @@ return new Parser; ...@@ -8973,6 +8978,12 @@ return new Parser;
} }
} }
} }
if (!result.hasOwnProperty('action_href')) {
throw new jIO.util.jIOError(
"ERP5: can not modify document: " + id,
403
);
}
return context.putAttachment( return context.putAttachment(
id, id,
result.action_href, result.action_href,
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>949.22191.39286.53384</string> </value> <value> <string>950.24601.18563.49681</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1456225163.58</float> <float>1460128878.65</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