From 1689e53f6f60dcc27149b2c683058fd19b76b1c8 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 20 Apr 2024 20:41:09 +0200 Subject: [PATCH] window: edit: simplify setting submit button Since the reset-form functionality got moved into the header tools in commit 046ec35 ("fix #5277: move reset button into window header toolbar") we can unconditionally set the initial buttons, as those will always just contain the submit one now. Signed-off-by: Thomas Lamprecht --- src/window/Edit.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/window/Edit.js b/src/window/Edit.js index 17b57a6..1c2e63f 100644 --- a/src/window/Edit.js +++ b/src/window/Edit.js @@ -349,10 +349,9 @@ Ext.define('Proxmox.window.Edit', { me.title = Proxmox.Utils.dialog_title(me.subject, me.isCreate, me.isAdd); } - if (me.isCreate || !me.showReset) { - me.buttons = [submitBtn]; - } else { - me.buttons = [submitBtn]; + me.buttons = [submitBtn]; + + if (!me.isCreate && me.showReset)) { me.tools = [resetTool]; }