mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-01 00:19:44 +02:00
added reset button
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user