Commit dec0dcce authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: add `reference` in scheme editing form

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