# HG changeset patch # User Emmanuel Gil Peyrot # Date 1315863900 -7200 # Node ID addbf6bbfaa846270a18c5789f0c8e02c31f29b0 # Parent 99bd1d1ac071737c440b1648ddbb4f2d35f97cc0 Various fixes for the migration to ltx. diff --git a/forms.js b/forms.js --- a/forms.js +++ b/forms.js @@ -62,7 +62,9 @@ exports.build = function(type, desc, con if (desc[i].label) fieldAttr.label = desc[i].label; } - x.c('field', fieldAttr); + + var field = new Element('field', fieldAttr); + x.cnode(field); if (labels && (desc[i].type == 'list-multi' || @@ -71,22 +73,22 @@ exports.build = function(type, desc, con var optAttr = {}; if (desc[i].options[j].label) optAttr.label = desc[i].options[j].label; - x.c('option', optAttr).c('value').t(j).up().up(); + field.c('option', optAttr).c('value').t(j).up().up(); } } if (i == 'FORM_TYPE') - x.c('value').t(desc[i].value).up(); + field.c('value').t(desc[i].value).up(); else if (typeof content[i] != 'undefined') { var md = content[i]; if (desc[i].type == 'jid-multi' || desc[i].type == 'list-multi' || desc[i].type == 'text-multi') { for (var j=0; j