proxmox-backup/www/form/VerifyOutdatedAfter.js
Thomas Lamprecht a327f918af ui: add verifyOutdatedAfter component
mainly as separate component for the trigger

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-12 09:33:50 +02:00

32 lines
601 B
JavaScript

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);
},
},
});