Commit 31919118 authored by Ad Schellevis's avatar Ad Schellevis

(mvc) make setFormData aware of span tags to put data (info labels)

parent d34b2555
......@@ -96,7 +96,7 @@ function getFormData(parent) {
* @param data named array structure
*/
function setFormData(parent,data) {
$( "#"+parent+" input,#"+parent+" select" ).each(function( index ) {
$( "#"+parent+" input,#"+parent+" select,#"+parent+" span" ).each(function( index ) {
if ($(this).prop('id') == undefined) {
// we need an id.
return;
......@@ -127,6 +127,11 @@ function setFormData(parent,data) {
} else {
targetNode.prop("checked",false) ;
}
} else if (targetNode.is("span")) {
if (node[keypart] != null) {
targetNode.text("");
targetNode.append($.parseHTML(String(node[keypart])));
}
} else {
// regular input type
targetNode.val(node[keypart]);
......
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