Commit cec9776c authored by Boris Kocherov's avatar Boris Kocherov

it allows to create documents with predefined id.

parent b067eb2b
......@@ -231,6 +231,10 @@
var form_data = new FormData();
form_data.append("portal_type", data.portal_type);
form_data.append("parent_relative_url", data.parent_relative_url);
if (data.id) {
form_data.append("id", data.id);
delete data.id;
}
return jIO.util.ajax({
type: "POST",
url: site_hal._actions.add.href,
......@@ -270,7 +274,9 @@
400
);
}
if ((key !== "portal_type") && (key !== "parent_relative_url")) {
if ((key !== "portal_type")
&& (key !== "parent_relative_url")
&& (key !== "id")) {
if (!json.hasOwnProperty(key)) {
throw new jIO.util.jIOError(
"ERP5: can not store property: " + key,
......
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