mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-03 04:50:07 +00:00
22 lines
499 B
JavaScript
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);
|
|
},
|
|
},
|
|
},
|
|
});
|