/* * The actual <form> */ 
/* * The actual <form> */ 
RB.dialogs.FormDialog = function(config) {	/*	 * Form dialogs only need two buttons: A confirmation button, and a	 * cancel button.	 */    config.buttons = [{        text: config.confirmButton || "OK",        cb: this.submit.createDelegate(this)    }, {        text: config.cancelButton || "Cancel",        is_default: true    }];    config.dialogClass = "formdlg"    RB.dialogs.FormDialog.superclass.constructor.call(this, config);    this.on('hide', function() {		/*		 * When we hide the dialog, we want to reset the dialog by clearing		 * all fields and all displayed errors.		 */        this.clearErrors();        if (this.formEl) {            this.formEl.dom.reset();        }    }, this, true);	/*	 * The actual <form>	 */    this.formEl = dh.append(this.bodyEl.dom, {        tag: 'form',        action: config.action || ".",    }, true);	/*	 * The table containing the fields and labels.	 */    this.tableEl = dh.append(this.formEl.dom, {        tag: 'table'    }, true);    var tbody = dh.append(this.tableEl.dom, {        tag: 'tbody'    }, true);	/*	 * A dictionary containing information on each field, for future reference.	 * The dictionary is in the following format:	 *	 * fieldname: {	 *    'field': {	 *        'name':   string,  // Field name,	 *        'hidden': bool,    // Indicates if this is hidden	 *        'label':  string,  // The displayed field label	 *        'widget': string   // HTML describing the field widget	 *    },	 *    'row':      element,   // Table row element for the field	 *    'errorRow': element    // Table row element for the field's error	 * }	 */    this.fieldInfo = {};    for (var i = 0; i < config.fields.length; i++) {        var field = this.fields[i];        this.fieldInfo[field.name] = {'field': field};        if (field.hidden) {            dh.insertHtml("beforeEnd", this.formEl.dom, field.widget);        } else {            this.fieldInfo[field.name].row = dh.append(tbody.dom, {                tag: 'tr',                children: [{                    tag: 'td',                    cls: 'label',                    html: field.label                }, {                    tag: 'td',                    html: field.widget                }]            }, true);            this.fieldInfo[field.name].errorRow = dh.append(tbody.dom, {                tag: 'tr'            }, true);        }    }}
4441	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4441/f739c8b268ada26ee98cbb02e1ef80e98640fe9d/dialogs.js/buggy/htdocs/scripts/rb/dialogs.js