mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 12:44:56 +00:00
Add Storage Controller class
This controller will display the 'Max Backups' field only if the storage can hold backups. Signed-off-by: Emmanuel Kasper <e.kasper@proxmox.com>
This commit is contained in:
parent
54165ad3ce
commit
a7664d88d6
@ -10,6 +10,7 @@ JSSRC= \
|
|||||||
button/ConsoleButton.js \
|
button/ConsoleButton.js \
|
||||||
button/Split.js \
|
button/Split.js \
|
||||||
button/HelpButton.js \
|
button/HelpButton.js \
|
||||||
|
controller/StorageEdit.js \
|
||||||
qemu/SendKeyMenu.js \
|
qemu/SendKeyMenu.js \
|
||||||
qemu/CmdMenu.js \
|
qemu/CmdMenu.js \
|
||||||
qemu/TemplateMenu.js \
|
qemu/TemplateMenu.js \
|
||||||
|
18
www/manager6/controller/StorageEdit.js
Normal file
18
www/manager6/controller/StorageEdit.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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 (!hasBackups) {
|
||||||
|
// clear values which will never be submitted
|
||||||
|
maxfiles.reset();
|
||||||
|
}
|
||||||
|
maxfiles.setDisabled(!hasBackups);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user