mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-06-30 17:11:00 +00:00
form: add PruneKeepField
over from PBS Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
71a084c2ff
commit
9b4b2e745b
@ -28,6 +28,7 @@ JSSRC= \
|
||||
form/BondModeSelector.js \
|
||||
form/NetworkSelector.js \
|
||||
form/RealmComboBox.js \
|
||||
form/PruneKeepField.js \
|
||||
form/RoleSelector.js \
|
||||
form/DiskSelector.js \
|
||||
form/MultiDiskSelector.js \
|
||||
|
27
src/form/PruneKeepField.js
Normal file
27
src/form/PruneKeepField.js
Normal file
@ -0,0 +1,27 @@
|
||||
Ext.define('Proxmox.form.PruneKeepField', {
|
||||
extend: 'Proxmox.form.field.Integer',
|
||||
xtype: 'pmxPruneKeepField',
|
||||
|
||||
allowBlank: true,
|
||||
minValue: 1,
|
||||
|
||||
listeners: {
|
||||
change: function(field, newValue, oldValue) {
|
||||
if (newValue !== this.originalValue) {
|
||||
this.triggers.clear.setVisible(true);
|
||||
}
|
||||
},
|
||||
},
|
||||
triggers: {
|
||||
clear: {
|
||||
cls: 'pmx-clear-trigger',
|
||||
weight: -1,
|
||||
hidden: true,
|
||||
handler: function() {
|
||||
this.triggers.clear.setVisible(false);
|
||||
this.setValue(this.originalValue);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
});
|
Loading…
Reference in New Issue
Block a user