Commit a92ffff8 authored by Sven Franck's avatar Sven Franck

app: allow form widget to be updated (refreshed)

parent 9ce5d9c0
...@@ -1483,6 +1483,9 @@ ...@@ -1483,6 +1483,9 @@
container = document.createDocumentFragment(); container = document.createDocumentFragment();
form_id = "form_" + util.uuid(); form_id = "form_" + util.uuid();
item_id = spec.data ? (spec.data._id || undefined) : undefined; item_id = spec.data ? (spec.data._id || undefined) : undefined;
if (spec.update) {
form = document.createDocumentFragment();
} else {
form = factory.element({ form = factory.element({
"type": "form", "type": "form",
"direct": { "direct": {
...@@ -1491,13 +1494,17 @@ ...@@ -1491,13 +1494,17 @@
"action": "#", "action": "#",
"className": (spec.class_list || "") "className": (spec.class_list || "")
}, },
"attributes": {"data-ajax": false, "autocomplete": "off"}, "attributes": {
"data-ajax": false,
"autocomplete": "off",
"data-widget": "form"
},
"logic": { "logic": {
"data-reference": spec.reference || null, "data-reference": spec.reference || null,
"data-depend": spec.depend || null, "data-map": spec.map_children || null
"data-reset": spec.reset || null
} }
}); });
}
// NOTE: needed to differentiate between PUT/POST // NOTE: needed to differentiate between PUT/POST
// TODO: block_identifier is only used for release_install, find better! // TODO: block_identifier is only used for release_install, find better!
......
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