added reset button

This commit is contained in:
Sebastian Sdorra
2010-09-19 15:35:14 +02:00
parent d9064a91a9
commit fbe74c8cd0

View File

@@ -35,7 +35,6 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, {
items: null,
onSubmit: null,
getValues: null,
onCancel: null,
initComponent: function(){
@@ -68,9 +67,11 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, {
scope: this,
handler: this.submitForm
},{
text: 'Cancel',
text: 'Reset',
scope: this,
handler: this.cancel
handler: function(){
this.getForm().reset();
}
}]
}]
};
@@ -92,13 +93,6 @@ Sonia.config.ConfigForm = Ext.extend(Ext.form.FormPanel, {
if ( this.onSubmit != null && Ext.isFunction( this.onSubmit ) ){
this.onSubmit( form.getValues() );
}
},
cancel: function(){
var form = this.getForm();
if ( this.onCancel != null && Ext.isFunction( this.onCancel ) ){
this.onCancel(form);
}
}
});