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);