mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-07 14:46:12 +00:00
add custom submittext to Edit Window
we will use this for the restore window Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
fa6dc53bcc
commit
ffea05ec4e
@ -23,6 +23,9 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
// set to true if you want an Remove button (instead of Create)
|
// set to true if you want an Remove button (instead of Create)
|
||||||
isRemove: false,
|
isRemove: false,
|
||||||
|
|
||||||
|
// custom submitText
|
||||||
|
submitText: undefined,
|
||||||
|
|
||||||
backgroundDelay: 0,
|
backgroundDelay: 0,
|
||||||
|
|
||||||
// needed for finding the reference to submitbutton
|
// needed for finding the reference to submitbutton
|
||||||
@ -221,7 +224,9 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
|
|
||||||
var submitText;
|
var submitText;
|
||||||
if (me.create) {
|
if (me.create) {
|
||||||
if (me.isAdd) {
|
if (me.submitText) {
|
||||||
|
submitText = me.submitText;
|
||||||
|
} else if (me.isAdd) {
|
||||||
submitText = gettext('Add');
|
submitText = gettext('Add');
|
||||||
} else if (me.isRemove) {
|
} else if (me.isRemove) {
|
||||||
submitText = gettext('Remove');
|
submitText = gettext('Remove');
|
||||||
@ -229,7 +234,7 @@ Ext.define('Proxmox.window.Edit', {
|
|||||||
submitText = gettext('Create');
|
submitText = gettext('Create');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
submitText = gettext('OK');
|
submitText = me.submitText || gettext('OK');
|
||||||
}
|
}
|
||||||
|
|
||||||
var submitBtn = Ext.create('Ext.Button', {
|
var submitBtn = Ext.create('Ext.Button', {
|
||||||
|
Loading…
Reference in New Issue
Block a user