From b0eafb68a983051d9198cd5182d7e48b22d89c65 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 12 Nov 2024 15:41:54 +0100 Subject: [PATCH] webhook edit: use type in add button text so one can more easily see what gets added. Signed-off-by: Dominik Csapak --- src/panel/WebhookEditPanel.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/panel/WebhookEditPanel.js b/src/panel/WebhookEditPanel.js index fcc5b06..8b76d0a 100644 --- a/src/panel/WebhookEditPanel.js +++ b/src/panel/WebhookEditPanel.js @@ -70,6 +70,7 @@ Ext.define('Proxmox.panel.WebhookEditPanel', { xtype: 'pmxWebhookKeyValueList', name: 'header', fieldLabel: gettext('Headers'), + subject: gettext('Header'), maskValues: false, cbind: { isCreate: '{isCreate}', @@ -91,6 +92,7 @@ Ext.define('Proxmox.panel.WebhookEditPanel', { xtype: 'pmxWebhookKeyValueList', name: 'secret', fieldLabel: gettext('Secrets'), + subject: gettext('Secret'), maskValues: true, cbind: { isCreate: '{isCreate}', @@ -168,6 +170,9 @@ Ext.define('Proxmox.form.WebhookKeyValueList', { // override for column header fieldTitle: gettext('Item'), + // the text for a single element, used for the add button + subject: undefined, + // will be applied to the textfields maskRe: undefined, @@ -391,7 +396,7 @@ Ext.define('Proxmox.form.WebhookKeyValueList', { }, { xtype: 'button', - text: gettext('Add'), + text: me.subject ? Ext.String.format(gettext('Add {0}'), me.subject) : gettext('Add'), iconCls: 'fa fa-plus-circle', handler: 'addLine', },