Commit f5b23f1a authored by Sven Franck's avatar Sven Franck

app: allow display of empty record

parent f335389e
...@@ -6129,10 +6129,6 @@ ...@@ -6129,10 +6129,6 @@
// dynamic content // dynamic content
// TODO: 10 if-else... // TODO: 10 if-else...
if (!pass.skip) { if (!pass.skip) {
// set empty "record" to allow generation of empty form
if (pass.url_dict.mode === "new") {
pointer_results = {"data": {"total_rows": 1, "rows": [{"doc": {}}]}};
}
// inherit item id, so it's available in form as indentifier // inherit item id, so it's available in form as indentifier
if (pointer_results.data.total_rows === 1) { if (pointer_results.data.total_rows === 1) {
...@@ -6140,7 +6136,11 @@ ...@@ -6140,7 +6136,11 @@
} }
// no items, need no show! (default to empty {} if none provided // no items, need no show! (default to empty {} if none provided
if (pointer_results.data.total_rows === 0) { if (pointer_results.data.total_rows === 0) {
quirk_dict.no_show = quirk_dict.no_items || {}; if (quirk_dict.property_dict.allow_new) {
pointer_results = {"data": {"total_rows": 1, "rows": [{"doc": {}}]}};
} else {
quirk_dict.no_show = quirk_dict.no_items || {};
}
} }
// set up fragment and child_selector // set up fragment and child_selector
if (quirk_dict.update !== true) { if (quirk_dict.update !== true) {
......
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