]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: vm hotplug selector: refactor for sane formatting
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 6 Jul 2018 06:05:48 +0000 (08:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 6 Jul 2018 06:05:48 +0000 (08:05 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/form/HotplugFeatureSelector.js

index cb373b69448c653d5e5beddc7658feeb51c74a99..348d970c63ce9cbc90a7df197258d28c775514e6 100644 (file)
@@ -4,12 +4,35 @@ Ext.define('PVE.form.HotplugFeatureSelector', {
 
     columns: 1,
     vertical: true,
+
+    defaults: {
+       name: 'hotplug',
+       submitValue: false
+    },
     items: [
-       { boxLabel: gettext('Disk'),    name: 'hotplug', inputValue: 'disk',   submitValue: false, checked: true },
-       { boxLabel: gettext('Network'), name: 'hotplug', inputValue: 'network',submitValue: false, checked: true },
-       { boxLabel: 'USB',              name: 'hotplug', inputValue: 'usb',    submitValue: false, checked: true },
-       { boxLabel: gettext('Memory'),  name: 'hotplug', inputValue: 'memory', submitValue: false },
-       { boxLabel: gettext('CPU'),     name: 'hotplug', inputValue: 'cpu',    submitValue: false }
+       {
+           boxLabel: gettext('Disk'),
+           inputValue: 'disk',
+           checked: true
+       },
+       {
+           boxLabel: gettext('Network'),
+           inputValue: 'network',
+           checked: true
+       },
+       {
+           boxLabel: 'USB',
+           inputValue: 'usb',
+           checked: true
+       },
+       {
+           boxLabel: gettext('Memory'),
+           inputValue: 'memory'
+       },
+       {
+           boxLabel: gettext('CPU'),
+           inputValue: 'cpu'
+       }
     ],
 
     setValue: function(value) {