Change button type of WinForm when the record is not saved yet

issue3325
This commit is contained in:
Cédric Krier committed 2013-08-23 14:04:55 +02:00
1 parent 7c45a77138
commit 770f539a40
1 file changed
+3 -1
+3 -1
View File
@@ -43,7 +43,9 @@
var buttons = [];
buttons.push({
text: 'Cancel',
text: (!kwargs.new_ && this.screen.current_view &&
this.screen.current_record.id < 0 ?
'Delete' : 'Cancel'),
click: function() {
this.response('RESPONSE_CANCEL');
}.bind(this)