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 <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-04-20 20:41:09 +02:00
parent f646c22a67
commit 1689e53f6f

View File

@ -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];
}