ui: verify job: make namespace and max-depth aware
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
33
www/form/NamespaceMaxDepth.js
Normal file
33
www/form/NamespaceMaxDepth.js
Normal file
@ -0,0 +1,33 @@
|
||||
Ext.define('PBS.form.NamespaceMaxDepth', {
|
||||
extend: 'Proxmox.form.field.Integer',
|
||||
alias: 'widget.pbsNamespaceMaxDepth',
|
||||
|
||||
allowBlank: true,
|
||||
|
||||
emptyText: gettext('Full'),
|
||||
fieldLabel: gettext('Max. Depth'),
|
||||
deleteEmpty: true,
|
||||
|
||||
minValue: 0,
|
||||
maxValue: 7,
|
||||
|
||||
triggers: {
|
||||
clear: {
|
||||
cls: 'pmx-clear-trigger',
|
||||
weight: -1,
|
||||
hidden: true,
|
||||
handler: function() {
|
||||
this.triggers.clear.setVisible(false);
|
||||
this.setValue('');
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
listeners: {
|
||||
change: function(field, value) {
|
||||
let canClear = value !== '';
|
||||
field.triggers.clear.setVisible(canClear);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user