pve-manager/www/manager6/controller/StorageEdit.js
Thomas Lamprecht f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00

22 lines
499 B
JavaScript

Ext.define('PVE.controller.StorageEdit', {
extend: 'Ext.app.ViewController',
alias: 'controller.storageEdit',
control: {
'field[name=content]': {
change: function(field, value) {
var hasBackups = Ext.Array.contains(value, 'backup');
var maxfiles = this.lookupReference('maxfiles');
if (!maxfiles) {
return;
}
if (!hasBackups) {
// clear values which will never be submitted
maxfiles.reset();
}
maxfiles.setDisabled(!hasBackups);
},
},
},
});