6 ui.PanelForm = ui.AbstractWidget.extend({
8 fields: null // (required) instanceof app.ux.FieldCollection
10 init: function(parent) {
12 this.el = $.joey(this._main_template());
13 this.attach( parent );
15 _main_template: function() {
16 return { tag: "DIV", id: this.id(), cls: "uiPanelForm", children: this.config.fields.fields.map(this._field_template, this) };
18 _field_template: function(field) {
19 return { tag: "LABEL", cls: "uiPanelForm-field", children: [
20 { tag: "DIV", cls: "uiPanelForm-label", children: [ field.label, ut.require_template(field) ] },
26 })( this.jQuery, this.app );