]> git.proxmox.com Git - pve-manager.git/commit - www/manager6/window/Clone.js
Disable the submit button based on whole form validity
authorEmmanuel Kasper <e.kasper@proxmox.com>
Thu, 12 Jan 2017 09:13:56 +0000 (10:13 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 12 Jan 2017 09:40:22 +0000 (10:40 +0100)
commit26693bb937406cda0eef564dd16090a04fbaf1a8
tree766cd98713b4c39dbcc536af319f27561874016f
parentc3dea8fcaa91827307c5c954f0e116eac3949859
Disable the submit button based on whole form validity

Until now we disabled the submit button, based on
the feature API call where we tested if the selected VM, and its snapshot
can be used as the source of a clone.

This had the following problems:
 * the feature test for copy clone / linked clone always returned true,
 since the passed paramaters were already filtered before user input
 (ie we only allowed a linked clone to be selected if the source VM is
 a template, or a snasphot to be selected if existed on source VM)
 * the guest ID input field was not validated

With the current patch, the validation is now made on each of the form
fields. verifyFeature() is still used to populate a list of valid nodes
passed to the Node Selector.
www/manager6/qemu/Clone.js