From 1f19465f652dce52976c8fc5f28317ce5eb802ee Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 21 Feb 2024 13:52:18 +0800 Subject: [PATCH] bugfix --- bricks/form.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bricks/form.js b/bricks/form.js index 9a739c3..5ac59d0 100644 --- a/bricks/form.js +++ b/bricks/form.js @@ -22,6 +22,7 @@ bricks.FormBody = class extends bricks.VBox { opts.scrollY = 'scroll'; super(opts); this.name_inputs = {}; + /* if (this.opts.title){ var t = new bricks.Title2({ otext:this.opts.title, @@ -36,6 +37,7 @@ bricks.FormBody = class extends bricks.VBox { i18n:true}); this.add_widget(d); } + */ this.form_body = new bricks.Layout({width:'100%', overflow:'auto' }); @@ -121,6 +123,20 @@ bricks.Form = class extends bricks.VBox { */ constructor(opts){ super(opts); + if (this.opts.title){ + var t = new bricks.Title3({ + otext:this.opts.title, + height:'auto', + i18n:true}); + this.add_widget(t); + } + if (this.opts.description){ + var d = new bricks.Text({ + otext:this.opts.description, + height:'auto', + i18n:true}); + this.add_widget(d); + } this.body = new bricks.FormBody(opts); this.body.bind('submited', this.redispatch_submited.bind(this)); this.add_widget(this.body);