return;
}
- if (!this.form.findField('company_id').getValue()) {
+ if (this.form.findField('company_id') && !this.form.findField('company_id').getValue()) {
Ext.MessageBox.alert("Error", "Select a Company");
return;
}
this.data = data;
this.create();
this.form.reset();
- //if (data._fetch) {
+ if ( this._id) {
this.dialog.show();
this.dialog.el.mask("Loading");
this.form.doAction('load', {
});
// this.fireEvent('show');
return;
+ }
//} else {
- // this.form.setValues(data);
+ this.form.setValues(data);
//}
this.form.fireEvent('actioncomplete', this.form,{
type : 'setdata',