]> git.proxmox.com Git - pve-manager.git/commitdiff
Submit pool if non-empty in lxc CreateWizard
authorAndrew Neitsch <andrew@neitsch.ca>
Mon, 2 Jul 2018 14:46:15 +0000 (07:46 -0700)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 11 Jul 2018 05:25:48 +0000 (07:25 +0200)
The lxc CreateWizard ignores the pool setting. That makes creating
containers impossible for users who are restricted to using a pool. This
patch fixes that.

Signed-off-by: Andrew Neitsch <andrew@neitsch.ca>
www/manager6/lxc/CreateWizard.js

index a913ca0ccf6ff48a1ae25772211dc7a53a78d6f5..ea86c6aaa665577b59ec6485ad405685faa5b399 100644 (file)
@@ -69,7 +69,6 @@ Ext.define('PVE.lxc.CreateWizard', {
                    xtype: 'pvePoolSelector',
                    fieldLabel: gettext('Resource Pool'),
                    name: 'pool',
-                   submitValue: false,
                    value: '',
                    allowBlank: true
                },
@@ -295,6 +294,10 @@ Ext.define('PVE.lxc.CreateWizard', {
                delete kv.nodename;
                delete kv.tmplstorage;
 
+               if (!kv.pool.length) {
+                   delete kv.pool;
+               }
+
                if (!kv.password.length && kv['ssh-public-keys']) {
                    delete kv.password;
                }