diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.config.js b/scm-webapp/src/main/webapp/resources/js/sonia.config.js index 818a07eead..7c7c62f143 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.config.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.config.js @@ -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); - } } });