ui: add verifyOutdatedAfter component

mainly as separate component for the trigger

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-11 14:17:26 +02:00
parent 0b1edf297b
commit a327f918af
2 changed files with 32 additions and 0 deletions

View File

@ -45,6 +45,7 @@ JSSRC= \
form/PermissionPathSelector.js \ form/PermissionPathSelector.js \
form/GroupSelector.js \ form/GroupSelector.js \
form/GroupFilter.js \ form/GroupFilter.js \
form/VerifyOutdatedAfter.js \
data/RunningTasksStore.js \ data/RunningTasksStore.js \
button/TaskButton.js \ button/TaskButton.js \
config/UserView.js \ config/UserView.js \

View File

@ -0,0 +1,31 @@
Ext.define('PBS.form.VerifyOutdatedAfter', {
extend: 'Proxmox.form.field.Integer',
alias: 'widget.pbsVerifyOutdatedAfter',
emptyText: gettext('Never'),
name: 'outdated-after',
minValue: 1,
value: 30,
allowBlank: true,
triggers: {
clear: {
cls: 'pmx-clear-trigger',
weight: -1,
hidden: false,
handler: function() {
this.triggers.clear.setVisible(false);
this.setValue('');
},
},
},
listeners: {
change: function(field, value) {
let canClear = value !== '';
field.triggers.clear.setVisible(canClear);
},
},
});