proxmox-backup/www/form/VerifyOutdatedAfter.js
Thomas Lamprecht dadaa9e2f0 ui: verify outdated: disallow blank and drop wrong empty text
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 16:46:06 +02:00

31 lines
569 B
JavaScript

Ext.define('PBS.form.VerifyOutdatedAfter', {
extend: 'Proxmox.form.field.Integer',
alias: 'widget.pbsVerifyOutdatedAfter',
name: 'outdated-after',
minValue: 1,
value: 30,
allowBlank: false,
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);
},
},
});