From 44e165322327d2053263db8c3da92dff2163e32a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 26 Sep 2025 08:10:38 +0800 Subject: [PATCH] bugfix --- bricks/form.js | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/bricks/form.js b/bricks/form.js index 94b16c1..328bcac 100644 --- a/bricks/form.js +++ b/bricks/form.js @@ -347,7 +347,7 @@ bricks.Form = class extends bricks.FormBase { this.add_widget(filler); this.nontextfields = []; this.textfields = []; - this.fields.forEach((f) => { + this.opts.fields.forEach((f) => { if (f.uitype == 'text'){ this.textfields.push(f); } else { @@ -355,40 +355,6 @@ bricks.Form = class extends bricks.FormBase { } }); this.body = new bricks.FormBody(this, opts); - /* - if (this.textfields.length > 0){ - var tp; - var tp_options = { - height: "100%", - tab_pos: "top", - items:[ - { - "name":"form", - "label":"Form", - "content":this.body - } - ] - }; - this.textfields.forEach((f) => { - var txtw = new bricks.UiText({ - name:f.name, - width:"100%", - height:"100%", - value:f.value - }); - txtw.bind('active', txtw.focus.bind(txtw)); - tp_options.items.push({ - name:f.name, - label:f.label, - content:txtw - }); - this.name_inputs[f.name] = txtw; - }); - tp = new bricks.TabPanel(tp_options); - filler.add_widget(tp); - } else { - } - */ filler.add_widget(this.body); if (! opts.notoolbar) this.build_toolbar(this);