Commit 473098ac authored by Boris Kocherov's avatar Boris Kocherov

UI: do not display label for form. display title instead

parent 5ba4e004
......@@ -538,6 +538,7 @@
div,
delete_button,
label,
label_text,
div_input,
span_info,
error_message,
......@@ -606,16 +607,24 @@
label.value = key;
gadget.props.property_name_edit = label;
} else {
label = document.createElement("label");
label.textContent = [key, json_field.title]
label_text = [key, json_field.title]
.filter(function (v) { return v; })
.join(" ")
// use non-breaking hyphen
.replace("-", "");
}
if (label.textContent) {
.replace(/-/g, "");
if (label_text) {
if (options.top) {
label = document.createElement("span");
label.textContent = label_text;
root.appendChild(label);
} else {
label = document.createElement("label");
label.textContent = label_text;
div.appendChild(label);
}
}
}
div_input = document.createElement("div");
div_input.setAttribute("id", gadget.element.getAttribute("data-gadget-scope") + first_path + '/');
div_input.setAttribute("class", "input");
......
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