Commit 70ba0d8f authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: add `reference` in scheme editing form

parent 3ddb7ebf
......@@ -106,6 +106,17 @@
"hidden": 0,
"type": "StringField"
},
"my_reference": {
"description": "",
"title": "Reference",
"default": gadget.state.doc.reference,
"css_class": "",
"required": 1,
"editable": 1,
"key": "reference",
"hidden": 0,
"type": "StringField"
},
"my_file": {
"description": "",
"title": "Upload and rewrite this document",
......@@ -142,7 +153,7 @@
form_definition: {
group_list: [[
"left",
[["my_title"], ["my_file"]]
[["my_title"], ["my_reference"], ["my_file"]]
], [
"bottom",
[["my_content"]]
......
......@@ -46,6 +46,9 @@
};
post_variables.title = data.file_name || post_variables.title;
if (data.file_name) {
post_variables.reference = data.file_name;
}
return gadget.jio_post(post_variables)
.push(function (id) {
return gadget.jio_putAttachment(id, 'data', blob);
......
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