From 770f539a4008eaeefabd8efdae2682ca9e0a6c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Aug 2013 14:04:55 +0200 Subject: [PATCH] Change button type of WinForm when the record is not saved yet issue3325 --- src/window.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/window.js b/src/window.js index ace6a0c4dd..505305e34a 100644 --- a/src/window.js +++ b/src/window.js @@ -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)