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:
parent
0b1edf297b
commit
a327f918af
|
@ -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 \
|
||||||
|
|
|
@ -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);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue